projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9506ca
)
xen/9pfs: fix two resource leaks on error paths, discovered by Coverity
author
Stefano Stabellini
<sstabellini@kernel.org>
Tue, 9 May 2017 19:04:51 +0000
(12:04 -0700)
committer
Stefano Stabellini
<sstabellini@kernel.org>
Tue, 16 May 2017 18:50:30 +0000
(11:50 -0700)
CID:
1374836
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
CC: anthony.perard@citrix.com
CC: groug@kaod.org
CC: aneesh.kumar@linux.vnet.ibm.com
hw/9pfs/xen-9p-backend.c
patch
|
blob
|
history
diff --git
a/hw/9pfs/xen-9p-backend.c
b/hw/9pfs/xen-9p-backend.c
index 9c7f41af99da297cb011f171e107af5f148313a5..a1fdedecc628f41b8b71582c9096e7618285ec56 100644
(file)
--- 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);