From 3f83bf24fd3d1f359b149d094fd86f795a3beed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Wed, 10 Jun 2020 19:04:26 +0800 Subject: Add author member to product struct --- client.c | 2 ++ icclient/product.h | 1 + 2 files changed, 3 insertions(+) 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 -- cgit v1.2.3