qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-stable] [Qemu-devel] [PATCH 06/14] qemu-io: Plug memory leak i


From: Markus Armbruster
Subject: Re: [Qemu-stable] [Qemu-devel] [PATCH 06/14] qemu-io: Plug memory leak in open command
Date: Tue, 27 May 2014 18:10:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Benoît Canet <address@hidden> writes:

> The Monday 26 May 2014 à 19:37:07 (+0200), Markus Armbruster wrote :
>> Introduced in commit b543c5c.  Spotted by Coverity.
>> 
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>>  qemu-io.c | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/qemu-io.c b/qemu-io.c
>> index ef3fef6..ffbad25 100644
>> --- a/qemu-io.c
>> +++ b/qemu-io.c
>> @@ -175,6 +175,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);
>>      }
>>  }
>> -- 
>> 1.9.3
>> 
>> 
> There is still a potential leak in openfile() in if (qemuio_bs).

I said "plug memory leak in open command", not "plug all memory leaks in
open command" ;)

Back to serious: you're right, and I'll plug that one, too.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]