summaryrefslogtreecommitdiff
path: root/catalog.c
diff options
context:
space:
mode:
Diffstat (limited to 'catalog.c')
-rw-r--r--catalog.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/catalog.c b/catalog.c
new file mode 100644
index 0000000..27e2385
--- /dev/null
+++ b/catalog.c
@@ -0,0 +1,11 @@
+#include <stdlib.h>
+#include "icclient/product.h"
+#include "icclient/catalog.h"
+
+void icclient_catalog_free(struct icclient_catalog *catalog)
+{
+ for (size_t i = 0; i < catalog->length; i++)
+ icclient_product_free(catalog->products[i]);
+ free(catalog);
+ catalog = NULL;
+}