From ee3cfdfd2996ddd92d46a448e8ea7ae0d9bb4070 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: Tue, 22 Oct 2019 19:03:44 +0800 Subject: Use the product free-er function to free search key --- client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client.c b/client.c index d796d6e..a1358c4 100644 --- a/client.c +++ b/client.c @@ -63,8 +63,7 @@ void icclient_order(icclient_ord_order **orderptr, const char *sku strcpy(key->sku, sku); icclient_product *product = bsearch(&key, products, catalog->length , sizeof(icclient_product *), prodcmp); - free(key->sku); - free(key); + icclient_freeproduct(key); icclient_ord_order *order = *orderptr; icclient_ord_item *item = NULL; -- cgit v1.2.3