Skip to content
Snippets Groups Projects
Commit 14c87152 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Mark destroyed resources as unused.

* This prevents bogus double free errors if reshListDestruct encounters
  an error that triggers itself again via at_exit.
parent 60d982d7
No related branches found
No related tags found
No related merge requests found
......@@ -178,6 +178,7 @@ reshListDestruct(int namespaceID)
listElem_t *listElem = resHList[namespaceID].resources + j;
if (listElem->status & RESH_IN_USE_BIT)
listElem->res.v.ops->valDestroy(listElem->res.v.val);
listElem->status = RESH_UNUSED;
}
Free(resHList[namespaceID].resources);
resHList[namespaceID].resources = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment