From 7f7cb0eaac8f4030a2eb7d77182f2d2e20373278 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: Sat, 28 Sep 2019 15:17:10 +0800 Subject: Revert "Revert "Freeing the catalog should be the memory allocator's responsibility"" This reverts commit 9beee6344f95d487c30e6bcdafaf9596716236c0. --- catalog.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/catalog.cxx b/catalog.cxx index 17702bc..8664cdc 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -51,11 +51,9 @@ namespace ICClient { void Catalog::update(icclient_catalog* catalog) { - if (catalog) { + if (catalog) for (size_t i = 0; i < catalog->length; i++) addProduct(Product{catalog->products[i]}); - icclient_product_freecatalog(catalog); - } emit updated(); } -- cgit v1.2.3