|
|
|
@ -281,6 +281,10 @@ void StorageFreeById(Storage *storage, StorageEnum type, int id)
|
|
|
|
|
{
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
BUG_ON(!storage_registraton_closed);
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef UNITTESTS
|
|
|
|
|
if (storage_map == NULL)
|
|
|
|
|
return;
|
|
|
|
|
#endif
|
|
|
|
|
SCLogDebug("storage %p id %d", storage, id);
|
|
|
|
|
|
|
|
|
@ -297,12 +301,15 @@ void StorageFreeById(Storage *storage, StorageEnum type, int id)
|
|
|
|
|
|
|
|
|
|
void StorageFreeAll(Storage *storage, StorageEnum type)
|
|
|
|
|
{
|
|
|
|
|
if (*storage == NULL)
|
|
|
|
|
if (storage == NULL)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
BUG_ON(!storage_registraton_closed);
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef UNITTESTS
|
|
|
|
|
if (storage_map == NULL)
|
|
|
|
|
return;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
Storage *store = storage;
|
|
|
|
|
int i;
|
|
|
|
@ -323,6 +330,10 @@ void StorageFree(Storage **storage, StorageEnum type)
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
BUG_ON(!storage_registraton_closed);
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef UNITTESTS
|
|
|
|
|
if (storage_map == NULL)
|
|
|
|
|
return;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
Storage *store = *storage;
|
|
|
|
|
int i;
|
|
|
|
|