iso, zip: fixed memory leak in destructor

Free the "context" pointer in the method archive_plugin.close().
This commit is contained in:
Max Kellermann 2009-12-15 19:56:38 +01:00
parent 3411f6cffd
commit 9179f108a5
3 changed files with 5 additions and 2 deletions

1
NEWS
View File

@ -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

View File

@ -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 */

View File

@ -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 */