summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-10 19:04:26 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-10 19:04:26 +0800
commit3f83bf24fd3d1f359b149d094fd86f795a3beed4 (patch)
tree59550805cd7b0ee59e828ffd61b9aa012ace0fee
parenta9eac750ab758d279dc97fc4bc5075ddc6f22896 (diff)
Add author member to product struct
-rw-r--r--client.c2
-rw-r--r--icclient/product.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/client.c b/client.c
index 9a2aa09..e829a88 100644
--- a/client.c
+++ b/client.c
@@ -151,6 +151,8 @@ void icclient_page(const char *path, size_t (*handler)(void *, size_t, size_t
void icclient_freeproduct(icclient_product *product)
{
+ if (product->author)
+ free(product->author);
if (product->image)
free(product->image);
if (product->comment)
diff --git a/icclient/product.h b/icclient/product.h
index 4e879e0..5e78b2c 100644
--- a/icclient/product.h
+++ b/icclient/product.h
@@ -7,6 +7,7 @@ struct icclient_product {
char *comment;
char *image;
double price;
+ char *author;
};
#endif // ICCLIENT_PRODUCT_H