Skip to content
Snippets Groups Projects
Verified Commit 4fdec49b authored by Bruce Cowan's avatar Bruce Cowan :airplane:
Browse files

slist: Fix free_all function

parent b367294f
No related branches found
No related tags found
No related merge requests found
Pipeline #4319 passed
......@@ -102,5 +102,14 @@ void
slist_free_all (SList *list,
FreeFunc func)
{
slist_foreach (list, (ForEachFunc) slist_free_one, NULL);
SList *next;
if (!list)
return;
for (SList *l = list; l; l = next)
{
next = l->next;
slist_free_one (l, func);
}
}
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