From: Harmandeep Kaur <write.harmandeep@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: wei.liu2@citrix.com, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com, dario.faggioli@citrix.com,
ian.jackson@eu.citrix.com,
Harmandeep Kaur <write.harmandeep@gmail.com>
Subject: [PATCH v2] libxc: fix leak in xc_offline_page error path
Date: Wed, 10 Feb 2016 16:49:38 +0530 [thread overview]
Message-ID: <1455103178-3959-1-git-send-email-write.harmandeep@gmail.com> (raw)
Avoid leaking the mapping of the m2p in one of the possible failure cases.
Coverity CID 1351225
Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com>
---
v2: update commit message and changelog
---
tools/libxc/xc_offline_page.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/libxc/xc_offline_page.c b/tools/libxc/xc_offline_page.c
index bc91d51..3248a34 100644
--- a/tools/libxc/xc_offline_page.c
+++ b/tools/libxc/xc_offline_page.c
@@ -504,7 +504,7 @@ int xc_exchange_page(xc_interface *xch, int domid, xen_pfn_t mfn)
if ( xc_map_domain_meminfo(xch, domid, &minfo) )
{
PERROR("Could not map domain's memory information\n");
- return -1;
+ goto failed;
}
/* For translation macros */
--
2.5.0
next reply other threads:[~2016-02-10 11:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 11:19 Harmandeep Kaur [this message]
2016-02-10 11:51 ` [PATCH v2] libxc: fix leak in xc_offline_page error path Ian Jackson
2016-02-11 15:37 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455103178-3959-1-git-send-email-write.harmandeep@gmail.com \
--to=write.harmandeep@gmail.com \
--cc=dario.faggioli@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).