[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PULL 3/4] xen/9pfs: fix two resource leaks on error paths, discovered by Coverity
CID: 1374836 Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> Reviewed-by: Eric Blake <eblake@xxxxxxxxxx> Reviewed-by: Greg Kurz <groug@xxxxxxxx> CC: anthony.perard@xxxxxxxxxx CC: groug@xxxxxxxx CC: aneesh.kumar@xxxxxxxxxxxxxxxxxx --- 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |