aboutsummaryrefslogtreecommitdiffstats
path: root/src/archive/iso_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-15 19:45:50 +0100
committerMax Kellermann <max@duempel.org>2009-12-15 19:45:50 +0100
commit3411f6cffdcf3c72e7cee3a263c40414dfef956e (patch)
tree4bd717fe41575262ad52d2ac50d5f811b5e63894 /src/archive/iso_plugin.c
parent6c0f50efb568a6da52e6c31920bc93c4254063c7 (diff)
downloadmpd-3411f6cffdcf3c72e7cee3a263c40414dfef956e.tar.gz
mpd-3411f6cffdcf3c72e7cee3a263c40414dfef956e.tar.xz
mpd-3411f6cffdcf3c72e7cee3a263c40414dfef956e.zip
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.
Diffstat (limited to '')
-rw-r--r--src/archive/iso_plugin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/archive/iso_plugin.c b/src/archive/iso_plugin.c
index d295f148f..7d2c075b1 100644
--- a/src/archive/iso_plugin.c
+++ b/src/archive/iso_plugin.c
@@ -165,6 +165,8 @@ iso_is_close(struct input_stream *is)
{
iso_context *context = (iso_context *) is->data;
g_free(context->statbuf);
+
+ iso_close((struct archive_file *)context);
}