(free_plist): Unref also nested plist.
authorhanda <handa>
Mon, 14 May 2007 11:16:52 +0000 (11:16 +0000)
committerhanda <handa>
Mon, 14 May 2007 11:16:52 +0000 (11:16 +0000)
src/plist.c

index 8cda7b9..d04325a 100644 (file)
@@ -129,7 +129,9 @@ free_plist (void *object)
   do {
     MPlist *next = plist->next;
 
-    if (MPLIST_KEY (plist) != Mnil && MPLIST_KEY (plist)->managing_key)
+    if (MPLIST_KEY (plist) != Mnil
+       && (MPLIST_KEY (plist)->managing_key
+           || MPLIST_NESTED_P (plist)))
       M17N_OBJECT_UNREF (MPLIST_VAL (plist));
     M17N_OBJECT_UNREGISTER (plist_table, plist);
     free (plist);