projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
443422f
)
qemu-io: Plug memory leak in open command
author
Markus Armbruster
<armbru@redhat.com>
Wed, 28 May 2014 09:16:59 +0000
(11:16 +0200)
committer
Kevin Wolf
<kwolf@redhat.com>
Fri, 30 May 2014 12:26:54 +0000
(14:26 +0200)
Introduced in commit
b543c5c
. Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-io.c
patch
|
blob
|
history
diff --git
a/qemu-io.c
b/qemu-io.c
index ef3fef6e5f42347ece2b8389f9995030712493f8..f63e771d9860ef6f513afdda5a4133875c5d50c2 100644
(file)
--- a/
qemu-io.c
+++ b/
qemu-io.c
@@
-54,6
+54,7
@@
static int openfile(char *name, int flags, int growable, QDict *opts)
if (qemuio_bs) {
fprintf(stderr, "file open already, try 'help close'\n");
+ QDECREF(opts);
return 1;
}
@@
-175,6
+176,7
@@
static int open_f(BlockDriverState *bs, int argc, char **argv)
} else if (optind == argc) {
return openfile(NULL, flags, growable, opts);
} else {
+ QDECREF(opts);
return qemuio_command_usage(&open_cmd);
}
}