MCPcopy Create free account
hub / github.com/acl-dev/acl / acl_stack_clean

Function acl_stack_clean

lib_acl/src/stdlib/common/acl_stack.c:186–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186void acl_stack_clean(ACL_STACK *s, void (*free_fn)(void *))
187{
188 int i;
189
190 for (i = 0; i < s->count; i++) {
191 if (free_fn != NULL && s->items[i] != NULL)
192 free_fn(s->items[i]);
193 s->items[i] = NULL; /* sanity set to be null */
194 }
195
196 acl_default_free(__FILE__, __LINE__, s->items);
197 s->items = NULL;
198 s->count = 0;
199}
200
201void acl_stack_destroy(ACL_STACK *s, void (*free_fn)(void *))
202{

Callers 2

memCleanModuleFunction · 0.85
acl_stack_destroyFunction · 0.85

Calls 1

free_fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…