qemu-io: Fix memory leak in 'aio_write -z'
PATCH 1/1 qemu-io: Fix memory leak in 'aio_write -z'
Signed-off-by Kevin Wolf <[email protected]>
--- qemu-io-cmds.c | 1 + 1 file changed, 1 insertion(+)
qemu-io-cmds.c +1 -0
@@ -1699,6 +1699,7 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)int64_t count =cvtnum (argv[optind]);if (count <0 ) {print_cvtnum_err (count, argv[optind]); +g_free (ctx);return 0 ; }
Signature · 1 line
1.8.3.1
Quoted 4 lines · Kevin Wolf
Signed-off-by Kevin Wolf <[email protected]>--- qemu-io-cmds.c | 1 + 1 file changed, 1 insertion(+)
Reviewed-by Eric Blake <[email protected]>
Perhaps it would be easier to convert all the mid-function returns into 'goto cleanup', so that we don't have to repeat the cleanups everywhere, but that's more invasive.
Quoted 14 lines
qemu-io-cmds.c +1
-0@@ -1699,6 +1699,7 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)int64_t count =cvtnum (argv[optind]);if (count <0 ) {print_cvtnum_err (count, argv[optind]); +g_free (ctx);return 0 ; }
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org