From 5f25bd6a8166258aa361b66d17cc7161d624a1ea 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: Fri, 4 Oct 2019 22:25:52 +0800 Subject: Catalog update frees the C version catalog --- catalog.cxx | 4 +++- libicclient | 2 +- 2 files changed, 4 insertions(+), 2 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 index 685d975..7c2232c 160000 --- a/libicclient +++ b/libicclient @@ -1 +1 @@ -Subproject commit 685d975434d9311e5afebe9f933509f8bb2ad619 +Subproject commit 7c2232c3af7edf93a6caa71ffc969916b4f88c4a -- cgit v1.2.3