Re: [libvirt] [PATCH] qemu_monitor_json.c: avoid many unconditional leaks

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

 



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.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]