* [Qemu-devel] [PATCH] block: bdrv_create(): don't leak cco.filename on error
@ 2012-10-17 19:45 Luiz Capitulino
2012-10-18 7:15 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2012-10-18 9:46 ` [Qemu-devel] " Kevin Wolf
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Capitulino @ 2012-10-17 19:45 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Kevin Wolf
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
block.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index 5e8184f..63bf768 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.12.315.g682ce8b
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] block: bdrv_create(): don't leak cco.filename on error
2012-10-17 19:45 [Qemu-devel] [PATCH] block: bdrv_create(): don't leak cco.filename on error Luiz Capitulino
@ 2012-10-18 7:15 ` Stefan Hajnoczi
2012-10-18 9:46 ` [Qemu-devel] " Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-10-18 7:15 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: qemu-trivial, Kevin Wolf, qemu-devel
On Wed, Oct 17, 2012 at 04:45:25PM -0300, Luiz Capitulino wrote:
>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
> block.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block: bdrv_create(): don't leak cco.filename on error
2012-10-17 19:45 [Qemu-devel] [PATCH] block: bdrv_create(): don't leak cco.filename on error Luiz Capitulino
2012-10-18 7:15 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
@ 2012-10-18 9:46 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2012-10-18 9:46 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: qemu-trivial, qemu-devel
Am 17.10.2012 21:45, schrieb Luiz Capitulino:
>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-18 9:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 19:45 [Qemu-devel] [PATCH] block: bdrv_create(): don't leak cco.filename on error Luiz Capitulino
2012-10-18 7:15 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2012-10-18 9:46 ` [Qemu-devel] " Kevin Wolf
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).