From e13451f98fab003c4cb883075053f9fb09b5c3b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sun, 12 Mar 2023 17:06:04 +0800 Subject: Not using pointers on products to avoid allocations --- interchange.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'interchange.c') diff --git a/interchange.c b/interchange.c index 55bbdd0..b173614 100644 --- a/interchange.c +++ b/interchange.c @@ -87,13 +87,12 @@ void interchange_free_product(struct interchange_product *product) if (product->title) free(product->title); free(product->sku); - free(product); } void interchange_free_catalog(struct interchange_catalog *catalog) { for (size_t i = 0; i < catalog->length; i++) - interchange_free_product(catalog->products[i]); + interchange_free_product(&catalog->products[i]); free(catalog); } -- cgit v1.2.3