hostbits/xbits: free hostbit

Fix memory leak. Hostbits were not actually freed.

Bug #1975.
pull/2459/head
Victor Julien 9 years ago
parent 579d6d3ff7
commit a44b612a41

@ -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);
}
}

@ -36,7 +36,7 @@
#include "util-debug.h"
static void XBitFree(XBit *fb)
void XBitFree(XBit *fb)
{
if (fb == NULL)
return;

@ -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_ {

Loading…
Cancel
Save