summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-04 22:25:52 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-04 22:25:52 +0800
commit5f25bd6a8166258aa361b66d17cc7161d624a1ea (patch)
tree6817afad7c714f1af3ba4b8c9c120637e133156d
parent0f63d288930a71e9705ce1b48a5e0036a9161b52 (diff)
Catalog update frees the C version catalog
-rw-r--r--catalog.cxx4
m---------libicclient12
2 files changed, 10 insertions, 6 deletions
diff --git a/catalog.cxx b/catalog.cxx
index 8664cdc..709d20d 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_catalog_free(catalog);
+ }
emit updated();
}
diff --git a/libicclient b/libicclient
-Subproject 685d975434d9311e5afebe9f933509f8bb2ad61
+Subproject 7c2232c3af7edf93a6caa71ffc969916b4f88c4