Fix leak in pp2_charset_destroy
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 10 Sep 2009 13:30:47 +0000 (15:30 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 10 Sep 2009 13:30:47 +0000 (15:30 +0200)
src/charsets.c

index d2c79bd..9332aa0 100644 (file)
@@ -132,7 +132,12 @@ void pp2_charset_destroy(pp2_charset_t pct)
         assert(pct->ref_count >= 1);
         --(pct->ref_count);
         if (pct->ref_count == 0)
+        {
+#if YAZ_HAVE_ICU
+            icu_chain_destroy(pct->icu_chn);
+#endif
             xfree(pct);
+        }
     }
 }