From: Pierre Chifflier Date: Mon, 17 Mar 2014 17:59:35 +0000 (+0100) Subject: Hash table: free bucker in case of insertion error X-Git-Tag: suricata-4.0.4~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68ee43b9e62755088fb2ffb00d4402dcd5ce9d81;p=thirdparty%2Fsuricata.git Hash table: free bucker in case of insertion error This fixes a warning raised by cppcheck. --- diff --git a/src/util-hash.c b/src/util-hash.c index b9c9986f94..98765f5c3d 100644 --- a/src/util-hash.c +++ b/src/util-hash.c @@ -144,6 +144,8 @@ int HashTableAdd(HashTable *ht, void *data, uint16_t datalen) return 0; error: + if (hb != NULL) + SCFree(hb); return -1; }