From: handa Date: Mon, 14 May 2007 11:16:52 +0000 (+0000) Subject: (free_plist): Unref also nested plist. X-Git-Tag: FLT-base~68 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9929cb612e9e18a27aa67914550ec48915bc9ddf;p=m17n%2Fm17n-lib.git (free_plist): Unref also nested plist. --- diff --git a/src/plist.c b/src/plist.c index 8cda7b9..d04325a 100644 --- a/src/plist.c +++ b/src/plist.c @@ -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);