qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 1/3] xen/9pfs: fix two resource leaks on error paths, discovered by Coverity
@ 2017-05-09 19:04 Stefano Stabellini
  2017-05-09 19:04 ` [Qemu-devel] [PATCH v2 2/3] Check the return value of fcntl in qemu_set_cloexec Stefano Stabellini
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Stefano Stabellini @ 2017-05-09 19:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: xen-devel, sstabellini, anthony.perard, groug, aneesh.kumar

CID: 1374836

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
CC: anthony.perard@citrix.com
CC: groug@kaod.org
CC: aneesh.kumar@linux.vnet.ibm.com
---
 hw/9pfs/xen-9p-backend.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/9pfs/xen-9p-backend.c b/hw/9pfs/xen-9p-backend.c
index 9c7f41a..a1fdede 100644
--- a/hw/9pfs/xen-9p-backend.c
+++ b/hw/9pfs/xen-9p-backend.c
@@ -332,12 +332,14 @@ static int xen_9pfs_connect(struct XenDevice *xendev)
         str = g_strdup_printf("ring-ref%u", i);
         if (xenstore_read_fe_int(&xen_9pdev->xendev, str,
                                  &xen_9pdev->rings[i].ref) == -1) {
+            g_free(str);
             goto out;
         }
         g_free(str);
         str = g_strdup_printf("event-channel-%u", i);
         if (xenstore_read_fe_int(&xen_9pdev->xendev, str,
                                  &xen_9pdev->rings[i].evtchn) == -1) {
+            g_free(str);
             goto out;
         }
         g_free(str);
-- 
1.9.1

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

end of thread, other threads:[~2017-05-16 18:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-09 19:04 [Qemu-devel] [PATCH v2 1/3] xen/9pfs: fix two resource leaks on error paths, discovered by Coverity Stefano Stabellini
2017-05-09 19:04 ` [Qemu-devel] [PATCH v2 2/3] Check the return value of fcntl in qemu_set_cloexec Stefano Stabellini
2017-05-09 19:20   ` Eric Blake
2017-05-09 20:31   ` Greg Kurz
2017-05-11  7:55   ` Paolo Bonzini
2017-05-16 18:53     ` Stefano Stabellini
2017-05-09 19:04 ` [Qemu-devel] [PATCH v2 3/3] xen: call qemu_set_cloexec instead of fcntl Stefano Stabellini
2017-05-09 19:21   ` Eric Blake
2017-05-09 20:54   ` Greg Kurz
2017-05-09 19:20 ` [Qemu-devel] [PATCH v2 1/3] xen/9pfs: fix two resource leaks on error paths, discovered by Coverity Eric Blake
2017-05-09 19:28   ` Eric Blake
2017-05-09 19:47     ` Stefano Stabellini
2017-05-09 20:29 ` Greg Kurz

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