[libvirt] [PATCH 5/5] leasehelper: Refactor copying of old entries to avoid double free
Peter Krempa
pkrempa at redhat.com
Tue Jun 17 07:12:51 UTC 2014
On 06/16/14 18:00, Pavel Hrdina wrote:
> On 16.6.2014 17:21, Peter Krempa wrote:
>
> s/leasehelper/leaseshelper/ in subject
>
>> When copying entries from the old lease file into the new array the old
>> code would copy the pointer of the json object into the second array
>> without removing it from the first. Afterwards when both arrays were
>> freed this might lead to a crash due to access of already freed memory.
>>
>> Refactor the code to use the new array item stealing helper added to the
>> json code so that the entry resides just in one array.
>> ---
>> src/network/leaseshelper.c | 79 +++++++++++++++++++++++++---------------------
>> 1 file changed, 43 insertions(+), 36 deletions(-)
>
> ACK with changes
>
Thanks, I've fixed the nits and pushed the series.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140617/80457f92/attachment-0001.sig>
More information about the libvir-list
mailing list