[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qom-qmp-cmds: remove unnecessary alloc in qmp_object_add to
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] qom-qmp-cmds: remove unnecessary alloc in qmp_object_add to fix memleak |
Date: |
Mon, 6 Apr 2020 11:46:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 06/04/20 08:34, Markus Armbruster wrote:
> Paolo, looks like this has fallen through the cracks. If you'd prefer
> me to take it, let me know.
>
> Markus Armbruster <address@hidden> writes:
Actually it was in my latest pull request, but between this version,
Marc-André and mine you might have missed it:
commit 7f5d9b206d1e86425faa5b84b551068bf044b823
Author: Paolo Bonzini <address@hidden>
Date: Thu Mar 26 10:41:21 2020 +0100
object-add: don't create return value if failed
No need to return an empty value from object-add (it would also leak
if the command failed). While at it, remove the "if" around object_unref
since object_unref handles NULL arguments just fine.
Reported-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Thanks,
Paolo