diff options
| author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-20 11:24:12 +0800 |
|---|---|---|
| committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-20 11:24:12 +0800 |
| commit | a3b91bf175b9d51fdd3674112e60a773f13c8ea9 (patch) | |
| tree | c297742f6f068afed7fe7e901192cd21d2f7b9ee /product.c | |
| parent | 0d45381125b73feea759213b8341deb4e08d600c (diff) | |
Move product freeing implementation to product's own implementation
Diffstat (limited to 'product.c')
| -rw-r--r-- | product.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/product.c b/product.c new file mode 100644 index 0000000..6fb70b6 --- /dev/null +++ b/product.c @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include "icclient/product.h" + +void icclient_product_free(struct icclient_product *product) +{ + if (product->author) + free(product->author); + if (product->prodgroup) + free(product->prodgroup); + if (product->image) + free(product->image); + if (product->thumb) + free(product->thumb); + if (product->comment) + free(product->comment); + if (product->description) + free(product->description); + free(product->sku); + free(product); + product = NULL; +} |