summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-22 19:03:44 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-22 19:03:44 +0800
commitee3cfdfd2996ddd92d46a448e8ea7ae0d9bb4070 (patch)
tree0473145a4ccaadcf6483856b8cadea0a7f679bca
parente8ae8fbeab89beb43138e26465965d3510edd1c7 (diff)
Use the product free-er function to free search key
-rw-r--r--client.c3
1 files changed, 1 insertions, 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;