Skip to content
Snippets Groups Projects
Commit dcacd9bb authored by Thomas Jahns's avatar Thomas Jahns :cartwheel: Committed by Sergey Kosukhin
Browse files

Fix resource leak.

parent dd138828
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -407,9 +407,15 @@ reshDestroy(cdiResH resH)
nspT = namespaceResHDecode(resH);
xassert(nspT.nsp == nsp && nspT.idx >= 0 && nspT.idx < resHList[nsp].size && resHList[nsp].resources[nspT.idx].res.v.ops);
listElem_t *r = resHList[nsp].resources + nspT.idx;
if (resHList[nsp].resources[nspT.idx].status & RESH_IN_USE_BIT) reshRemove_(nsp, nspT.idx, __func__);
xassert(nspT.nsp == nsp && nspT.idx >= 0 && nspT.idx < resHList[nsp].size && r->res.v.ops);
if (r->status & RESH_IN_USE_BIT)
{
r->res.v.ops->valDestroy(r->res.v.val);
reshRemove_(nsp, nspT.idx, __func__);
}
LIST_UNLOCK();
}
......
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