summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();
}