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.1.0-beta1~445 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=802bdb26951b15f992508dd0e81084d673a402e3;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; }