summaryrefslogtreecommitdiff
path: root/interchange.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-12 17:06:04 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-12 17:06:04 +0800
commite13451f98fab003c4cb883075053f9fb09b5c3b1 (patch)
tree9c4e51cfbed239912cdfc0b32ddbc12ad7c7ffee /interchange.c
parentd3d334e4769e28e20be2041103ae87620f3f7c96 (diff)
Not using pointers on products to avoid allocations
Diffstat (limited to 'interchange.c')
-rw-r--r--interchange.c3
1 files changed, 1 insertions, 2 deletions
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);
}