Skip to content
Snippets Groups Projects
Commit 64919b72 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Don't hold a mutex while it's destroyed.

Found by Coverity.
If there's actually another thread using the list when the refcount
hits zero, you're going to have a bad time regardless of the lock.

Coverity has been pointing this out for a while, but we've been
ignoring it as a false positive.
parent 9aa90f28
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -146,8 +146,10 @@ long listDettach(link_list_t* list)
return(-1);
listLock(list);
if((refs=--list->refs)==0)
if((refs=--list->refs)==0) {
listUnlock(list);
listFree(list);
}
else
listUnlock(list);
......
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