skiplist insert free?
Thomas Guyot-Sionnest
dermoth at aei.ca
Thu Oct 16 07:15:45 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 15/10/08 11:18 AM, Ethan Galstad wrote:
> This has already been fixed in CVS. Probably in the 3.0.2 or 3.0.3
> release as well.
IIRC It wasn't fixed in Andreas' git HEAD, which was 3.0.3 at that time
(looks like Andreas's git repo is gone now...). I suggested moving the
malloc block instead. See:
http://solaris.beaubien.net/cgi-bin/gitweb.cgi?p=nagios.git;a=commit;h=b6b107dbd3ce93f048c64ef226f186aa1a91d1ed
100% untested but seems pretty obvious :)
> hirenp wrote:
>> Hi,
>>
>> I'm wondering if this is a valid submission:
>>
>> --- common/skiplist.c 2008-02-29 03:11:16.000000000 +0200
>> +++ /tmp/skiplist.c 2008-09-28 12:17:20.000000000 +0200
>> @@ -86,6 +86,7 @@
>> /* NOTE: this could made be more efficient */
>> if(list->allow_duplicates==FALSE){
>> if(skiplist_find_first(list,data,NULL))
>> + free(update);
>> return SKIPLIST_ERROR_DUPLICATE;
>> }
>>
>
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI9s4B6dZ+Kt5BchYRAipGAJ0WBYDqXyIm944b9cJeq/8L5MuJHACbBaSz
ufgIIYQdGFPXZ6niUzxjeL8=
=XXjr
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
More information about the Developers
mailing list