1 2 3 4 5 6 7 8 9 10
#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); }