[canopy-httpd] r1124 committed - if the handler to free data isn't NULL, use it when deleting an entry ...

2 views
Skip to first unread message

codesite...@google.com

unread,
Dec 18, 2010, 5:58:12 PM12/18/10
to canopy-s...@googlegroups.com
Revision: 1124
Author: phrakt
Date: Sat Dec 18 14:57:22 2010
Log: if the handler to free data isn't NULL, use it when deleting an entry
from
the table

http://code.google.com/p/canopy-httpd/source/detail?r=1124

Modified:
/trunk/src/lib/canopy/htab.c

=======================================
--- /trunk/src/lib/canopy/htab.c Wed Dec 15 20:03:27 2010
+++ /trunk/src/lib/canopy/htab.c Sat Dec 18 14:57:22 2010
@@ -332,6 +332,10 @@

if (htab->ht_flags & CNP_HTAB_COPYKEY)
cnp_free(ent->he_key);
+
+ if (htab->ht_datafree != NULL)
+ (*htab->ht_datafree)(ent->he_data);
+
cnp_free(ent);
}

Reply all
Reply to author
Forward
0 new messages