xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] libxc: fix leak in xc_offline_page error path
@ 2016-02-10 11:19 Harmandeep Kaur
  2016-02-10 11:51 ` Ian Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Harmandeep Kaur @ 2016-02-10 11:19 UTC (permalink / raw)
  To: xen-devel
  Cc: wei.liu2, ian.campbell, stefano.stabellini, dario.faggioli,
	ian.jackson, Harmandeep Kaur

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-11 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-10 11:19 [PATCH v2] libxc: fix leak in xc_offline_page error path Harmandeep Kaur
2016-02-10 11:51 ` Ian Jackson
2016-02-11 15:37   ` Ian Campbell

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).