archive: close archive when stream is closed
Fixes a memory leak: the "archive" input plugin opens the archive, but never closes it. This patch moves the responsibility for doing that to archive_plugin.open_stream(). This is an slight internal API change, but it is the simplest and least intrusive fix for the memory leak.
This commit is contained in:
@@ -173,6 +173,8 @@ bz2_is_close(struct input_stream *is)
|
||||
bz2_context *context = (bz2_context *) is->data;
|
||||
bz2_destroy(context);
|
||||
is->data = NULL;
|
||||
|
||||
bz2_close((struct archive_file *)context);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Reference in New Issue
Block a user