All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxc: Fix CID 1351228 resource leak
@ 2016-02-10  9:09 Harmandeep Kaur
  2016-02-10  9:32 ` Dario Faggioli
  0 siblings, 1 reply; 4+ messages in thread
From: Harmandeep Kaur @ 2016-02-10  9:09 UTC (permalink / raw)
  To: xen-devel
  Cc: wei.liu2, ian.campbell, stefano.stabellini, dario.faggioli,
	ian.jackson, Harmandeep Kaur

Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com>
---
 tools/libxc/xc_tbuf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/libxc/xc_tbuf.c b/tools/libxc/xc_tbuf.c
index 695939a..f06f566 100644
--- a/tools/libxc/xc_tbuf.c
+++ b/tools/libxc/xc_tbuf.c
@@ -70,9 +70,13 @@ int xc_tbuf_get_size(xc_interface *xch, unsigned long *size)
                     sysctl.u.tbuf_op.buffer_mfn);
 
     if ( t_info == NULL || t_info->tbuf_size == 0 )
+    {
+        xenforeignmemory_unmap(xch->fmem, t_info, 0);
         return -1;
+    }
 
     *size = t_info->tbuf_size;
+    xenforeignmemory_unmap(xch->fmem, t_info, *size);
 
     return 0;
 }
-- 
2.5.0

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

end of thread, other threads:[~2016-02-10 14:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-10  9:09 [PATCH] libxc: Fix CID 1351228 resource leak Harmandeep Kaur
2016-02-10  9:32 ` Dario Faggioli
2016-02-10 11:14   ` Ian Jackson
2016-02-10 14:09     ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.