[libvirt] [PATCH] qemu_monitor_json.c: avoid many unconditional leaks
Jim Meyering
jim at meyering.net
Mon Feb 1 18:49:59 UTC 2010
Daniel Veillard wrote:
...
>> In that case, here's a replacement patch:
>>
>> Subject: [PATCH] json.c: avoid an unconditional leak from most qemuMonitorJSON* functions
>>
>> * src/util/json.c (virJSONValueFree): Free the "value" pointer, too.
>> ---
>> src/util/json.c | 5 +++--
>> 1 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/util/json.c b/src/util/json.c
...
>> @@ -82,8 +82,9 @@ void virJSONValueFree(virJSONValuePtr value)
>> case VIR_JSON_TYPE_NUMBER:
>> VIR_FREE(value->data.number);
>> break;
>> -
>> }
>> +
>> + VIR_FREE(value);
>
> ACK, looks fine to me,
Thanks. Pushed.
More information about the libvir-list
mailing list