From: John Darrington Date: Sun, 4 Jul 2010 15:17:32 +0000 (+0200) Subject: Fix various memory leaks X-Git-Tag: sav-api~161 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=458ebdc8a14f6f3cb28dfb991b7cf1d2e422a852;p=pspp Fix various memory leaks --- diff --git a/src/data/dictionary.c b/src/data/dictionary.c index aa0fcd5654..dc7e873229 100644 --- a/src/data/dictionary.c +++ b/src/data/dictionary.c @@ -298,6 +298,7 @@ dict_destroy (struct dictionary *d) hmap_destroy (&d->name_map); attrset_destroy (&d->attributes); free (d->mrsets); + free (d->encoding); free (d); } } diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c index 8e99aa0423..340d71d776 100644 --- a/src/libpspp/i18n.c +++ b/src/libpspp/i18n.c @@ -291,8 +291,11 @@ i18n_done (void) { struct hmapx_node *node; struct converter *cvtr; + HMAPX_FOR_EACH (cvtr, node, &map) { + free (cvtr->tocode); + free (cvtr->fromcode); iconv_close (cvtr->conv); free (cvtr); } diff --git a/src/output/table-item.c b/src/output/table-item.c index b709273f9e..c7c0f91c9c 100644 --- a/src/output/table-item.c +++ b/src/output/table-item.c @@ -84,6 +84,7 @@ table_item_destroy (struct output_item *output_item) struct table_item *item = to_table_item (output_item); free (item->caption); table_unref (item->table); + free (item); } const struct output_item_class table_item_class =