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

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



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.


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