From 62d23b4337b83d2a2933c4fa4233906030e09fb6 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, 27 Sep 2019 21:47:08 +0800 Subject: Freeing the catalog should be the memory allocator's responsibility --- catalog.cxx | 4 +--- libicclient | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/catalog.cxx b/catalog.cxx index 17702bc..8664cdc 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -51,11 +51,9 @@ 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(); } diff --git a/libicclient b/libicclient index de16cb0..bf59ffd 160000 --- a/libicclient +++ b/libicclient @@ -1 +1 @@ -Subproject commit de16cb072e348fed875232c58cee7dfee5d97663 +Subproject commit bf59ffd31aeb3a328a489205ecbc45c194cfa5dc -- cgit v1.2.3