diff options
| author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-20 11:41:01 +0800 |
|---|---|---|
| committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-20 11:41:01 +0800 |
| commit | 63b109ca1c1c54319d164ddcfa5760aa66558ccd (patch) | |
| tree | 6904b1c8fa0a4109b0734ebc6067f5aa9af22490 /catalog.c | |
| parent | fdb6565f877a33aa95afc24d937650095cbd6e4d (diff) | |
Move catalog freeing implementation to catalog's own implementation
Diffstat (limited to 'catalog.c')
| -rw-r--r-- | catalog.c | 11 |
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; +} |