summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/object.c b/object.c
index 142ef69..4d11949 100644
--- a/object.c
+++ b/object.c
@@ -307,6 +307,15 @@ int object_list_contains(struct object_list *list, struct object *obj)
return 0;
}
+void object_list_free(struct object_list **list)
+{
+ while (*list) {
+ struct object_list *p = *list;
+ *list = p->next;
+ free(p);
+ }
+}
+
/*
* A zero-length string to which object_array_entry::name can be
* initialized without requiring a malloc/free.