Message ID | 1407357598-21541-62-git-send-email-mdroth@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
diff --git a/qemu-io.c b/qemu-io.c index 5d7b53f..bc1277d 100644 --- 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; } @@ -171,6 +172,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); } }