summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-27 21:47:08 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-28 15:04:30 +0800
commit9beee6344f95d487c30e6bcdafaf9596716236c0 (patch)
treec5a371cdbb29b2f8417b566d6c97655ed5236358
parentbffd7c68508f793fc00c7453850668f7c654e1d0 (diff)
Revert "Freeing the catalog should be the memory allocator's responsibility"
This reverts commit 62d23b4337b83d2a2933c4fa4233906030e09fb6. # Conflicts: # libicclient
-rw-r--r--catalog.cxx4
1 files changed, 3 insertions, 1 deletions
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();
}