From 9beee6344f95d487c30e6bcdafaf9596716236c0 Mon Sep 17 00:00:00 2001 From: ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ Date: Fri, 27 Sep 2019 21:47:08 +0800 Subject: Revert "Freeing the catalog should be the memory allocator's responsibility" This reverts commit 62d23b4337b83d2a2933c4fa4233906030e09fb6. # Conflicts: # libicclient --- catalog.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/catalog.cxx b/catalog.cxx index 8664cdc..17702bc 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -51,9 +51,11 @@ 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.3