We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 947dde9 commit a43eb11Copy full SHA for a43eb11
src/list.c
@@ -282,16 +282,16 @@ LIBNEX_PUBLIC void ListDestroyEntry (ListHead_t* list, ListEntry_t* entry)
282
LIBNEX_PUBLIC void ListDestroy (ListHead_t* list)
283
{
284
ListLock (list);
285
- // Go through every entry, destroying it
286
- ListEntry_t* curEntry = list->front;
287
- while (curEntry)
288
- {
289
- ListEntry_t* next = curEntry->next;
290
- ListDestroyEntry (list, curEntry);
291
- curEntry = next;
292
- }
293
if (!ListDeRef (list))
294
+ // Go through every entry, destroying it
+ ListEntry_t* curEntry = list->front;
+ while (curEntry)
+ {
+ ListEntry_t* next = curEntry->next;
+ ListDestroyEntry (list, curEntry);
+ curEntry = next;
+ }
295
ListUnlock (list);
296
free (list);
297
}
0 commit comments