From 9179f108a540dcd27dafeb015778cc4dd873dfe5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Dec 2009 19:56:38 +0100 Subject: [PATCH] iso, zip: fixed memory leak in destructor Free the "context" pointer in the method archive_plugin.close(). --- NEWS | 1 + src/archive/iso_plugin.c | 3 ++- src/archive/zip_plugin.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 7ead1f16e..cd39e9066 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.15.7 (2009/??/??) * archive: - close archive when stream is closed + - iso, zip: fixed memory leak in destructor * input: - file: don't fall back to parent directory - archive: fixed memory leak in error handler diff --git a/src/archive/iso_plugin.c b/src/archive/iso_plugin.c index 7d2c075b1..9063af0fc 100644 --- a/src/archive/iso_plugin.c +++ b/src/archive/iso_plugin.c @@ -132,7 +132,8 @@ iso_close(struct archive_file *file) } //close archive iso9660_close(context->iso); - context->iso = NULL; + + g_free(context); } /* single archive handling */ diff --git a/src/archive/zip_plugin.c b/src/archive/zip_plugin.c index 2f08b3812..243d46418 100644 --- a/src/archive/zip_plugin.c +++ b/src/archive/zip_plugin.c @@ -99,7 +99,8 @@ zip_close(struct archive_file *file) } //close archive zzip_dir_close (context->dir); - context->dir = NULL; + + g_free(context); } /* single archive handling */