block: bdrv_create(): don't leak cco.filename on error
PATCH 1/1 block: bdrv_create(): don't leak cco.filename on error
Signed-off-by Luiz Capitulino <[email protected]>
--- block.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
block.c +4 -2
@@ -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; }
Signature · 1 line
1.7.12.315.g682ce8b
Quoted 5 lines · Luiz Capitulino
Signed-off-by Luiz Capitulino <[email protected]>--- block.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by Stefan Hajnoczi <[email protected]>
Kevin Wolf
AppliedAm 17.10.2012 21:45, schrieb Luiz Capitulino:
Quoted 2 lines
Signed-off-by Luiz Capitulino <[email protected]>
Thanks, applied to the block branch.
Kevin