projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08089ed
)
qemu-io: fix a memory leak
author
Blue Swirl
<blauwirbel@gmail.com>
Wed, 12 Jan 2011 19:48:59 +0000
(19:48 +0000)
committer
Blue Swirl
<blauwirbel@gmail.com>
Wed, 12 Jan 2011 19:48:59 +0000
(19:48 +0000)
Fix a memory leak, reported by cppcheck:
[/src/qemu/qemu-io.c:1135]: (error) Memory leak: ctx
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-io.c
patch
|
blob
|
history
diff --git
a/qemu-io.c
b/qemu-io.c
index 65dee13731365fab711446c5e0bc64c83e077bc4..5b24c5eec217c671c9da103c92195880b714c7a7 100644
(file)
--- a/
qemu-io.c
+++ b/
qemu-io.c
@@
-1131,8
+1131,10
@@
aio_read_f(int argc, char **argv)
case 'P':
ctx->Pflag = 1;
ctx->pattern = parse_pattern(optarg);
- if (ctx->pattern < 0)
+ if (ctx->pattern < 0) {
+ free(ctx);
return 0;
+ }
break;
case 'q':
ctx->qflag = 1;