qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v10 05/30] qapi: Plug leaks in test-qmp-*


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v10 05/30] qapi: Plug leaks in test-qmp-*
Date: Fri, 6 Nov 2015 08:49:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/06/2015 08:21 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> writes:
> 
>> Make valgrind happy with the current state of the tests, so that
>> it is easier to see if future patches introduce new memory problems
>> without being drowned in noise.  Many of the leaks were due to
>> calling a second init without tearing down the data from an earlier
>> visit.  But since teardown is already idempotent, and we already
>> register teardown as part of input_visitor_test_add(), it is nicer
>> to just make init() safe to call multiple times than it is to have
>> to make all tests call teardown.
>>

>> @@ -191,6 +193,7 @@ static void 
>> test_validate_fail_struct(TestInputVisitorData *data,
>>
>>      visit_type_TestStruct(v, &p, NULL, &err);
>>      g_assert(err);
>> +    error_free(err);
> 
> v9 had /* FIXME: visitor should not allocate p when returning error */
> here.  Did you drop it intentionally?
> 

Yes, I dropped it intentionally.

> If you put it back, please mention it in the commit message.

Rather, I decided that it was sufficient to just fix the bug later
(patch already queued, but not posted), and minimize the churn (no need
to mark things up just to pull down the markings later):
http://repo.or.cz/qemu/ericb.git/commitdiff/ac584b53a

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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