Compare commits
2 Commits
21ffd343e1
...
c0fa7879b2
Author | SHA1 | Date |
---|---|---|
Dylan Baker | c0fa7879b2 | |
Dylan Baker | 2d201af326 |
|
@ -34,6 +34,14 @@ typedef struct {
|
|||
|
||||
#define PKGCONF_LIST_INITIALIZER { NULL, NULL, 0 }
|
||||
|
||||
static inline void
|
||||
pkgconf_list_zero(pkgconf_list_t *list)
|
||||
{
|
||||
list->head = NULL;
|
||||
list->tail = NULL;
|
||||
list->length = 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
pkgconf_node_insert(pkgconf_node_t *node, void *data, pkgconf_list_t *list)
|
||||
{
|
||||
|
|
|
@ -268,6 +268,8 @@ pkgconf_path_free(pkgconf_list_t *dirlist)
|
|||
free(pnode->path);
|
||||
free(pnode);
|
||||
}
|
||||
|
||||
pkgconf_list_zero(dirlist);
|
||||
}
|
||||
|
||||
static char *
|
||||
|
|
|
@ -390,4 +390,6 @@ pkgconf_tuple_free(pkgconf_list_t *list)
|
|||
|
||||
PKGCONF_FOREACH_LIST_ENTRY_SAFE(list->head, next, node)
|
||||
pkgconf_tuple_free_entry(node->data, list);
|
||||
|
||||
pkgconf_list_zero(list);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue