diff --git a/src/host-bit.c b/src/host-bit.c index db86924ee5..9c4083b02e 100644 --- a/src/host-bit.c +++ b/src/host-bit.c @@ -123,6 +123,7 @@ static void HostBitRemove(Host *h, uint16_t idx) GenericVar *gv = HostGetStorageById(h, host_bit_id); if (gv) { GenericVarRemove(&gv, (GenericVar *)fb); + XBitFree(fb); HostSetStorageById(h, host_bit_id, gv); } } diff --git a/src/util-var.c b/src/util-var.c index f5c0379fda..8a2df63f1f 100644 --- a/src/util-var.c +++ b/src/util-var.c @@ -36,7 +36,7 @@ #include "util-debug.h" -static void XBitFree(XBit *fb) +void XBitFree(XBit *fb) { if (fb == NULL) return; diff --git a/src/util-var.h b/src/util-var.h index b95b59fd2b..39f2698dc0 100644 --- a/src/util-var.h +++ b/src/util-var.h @@ -57,6 +57,8 @@ typedef struct XBit_ { uint32_t expire; } XBit; +void XBitFree(XBit *); + // A list of variables we try to resolve while parsing configuration file. // Helps to detect recursive declarations. typedef struct ResolvedVariable_ {