[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/32] block: bdrv_create(): don't leak cco.filename
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 11/32] block: bdrv_create(): don't leak cco.filename on error |
Date: |
Wed, 24 Oct 2012 11:50:35 +0200 |
From: Luiz Capitulino <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index 5e7fc9e..7e26b6f 100644
--- a/block.c
+++ b/block.c
@@ -379,7 +379,8 @@ int bdrv_create(BlockDriver *drv, const char* filename,
};
if (!drv->bdrv_create) {
- return -ENOTSUP;
+ ret = -ENOTSUP;
+ goto out;
}
if (qemu_in_coroutine()) {
@@ -394,8 +395,9 @@ int bdrv_create(BlockDriver *drv, const char* filename,
}
ret = cco.ret;
- g_free(cco.filename);
+out:
+ g_free(cco.filename);
return ret;
}
--
1.7.6.5
- [Qemu-devel] [PATCH 01/32] qemu-img: Fix division by zero for zero size images, (continued)
- [Qemu-devel] [PATCH 01/32] qemu-img: Fix division by zero for zero size images, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 02/32] qemu-iotests: Test qemu-img operation on zero size image, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 05/32] block: make bdrv_find_backing_image compare canonical filenames, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 03/32] qmp: fix __accept() in qmp.py, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 07/32] qemu-iotests: add relative backing file tests for block-commit (040), Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 04/32] qemu-img rebase: use empty string to rebase without backing file, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 08/32] qemu-img: Add --backing-chain option to info command, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 06/32] block: in commit, determine base image from the top image, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 12/32] monitor: Allow add-fd to any specified fd set, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 10/32] qemu-img: document 'info --backing-chain', Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 11/32] block: bdrv_create(): don't leak cco.filename on error,
Kevin Wolf <=
- [Qemu-devel] [PATCH 14/32] monitor: Prevent removing fd from set during init, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 09/32] qemu-iotests: Add 043 backing file chain infinite loop test, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 17/32] block: add bdrv_query_stats, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 15/32] qemu-config: Add new -add-fd command line option, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 19/32] block: introduce new dirty bitmap functionality, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 21/32] block: rename block_job_complete to block_job_completed, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 13/32] monitor: Enable adding an inherited fd to an fd set, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 22/32] block: add block-job-complete, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 16/32] block: add bdrv_query_info, Kevin Wolf, 2012/10/24
- [Qemu-devel] [PATCH 18/32] block: add bdrv_open_backing_file, Kevin Wolf, 2012/10/24