pool: avoid possible double free in error path

Should be impossible as a double free, but scan-build-7 thinks it
is possible.
pull/3534/head
Victor Julien 7 years ago
parent 7ce1ebe0d3
commit e180576afe

@ -197,6 +197,7 @@ Pool *PoolInit(uint32_t size, uint32_t prealloc_size, uint32_t elt_size,
SCLogError(SC_ERR_POOL_INIT, "init error");
if (p->Cleanup)
p->Cleanup(pb->data);
pb->data = NULL;
goto error;
}

Loading…
Cancel
Save