From 99f28bba826e0b04aecc4814521e4278ee6f51e2 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Tue, 31 Jan 2017 03:51:49 +0100 Subject: [PATCH] Plug memory leak in __archive_read_program() --- libarchive/archive_read_support_filter_program.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libarchive/archive_read_support_filter_program.c b/libarchive/archive_read_support_filter_program.c index 66dc2f424..b8bf12886 100644 --- a/libarchive/archive_read_support_filter_program.c +++ b/libarchive/archive_read_support_filter_program.c @@ -430,6 +430,7 @@ __archive_read_program(struct archive_read_filter *self, const char *cmd) &state->child_stdout); if (child == -1) { free(state->out_buf); + archive_string_free(&state->description); free(state); archive_set_error(&self->archive->archive, EINVAL, "Can't initialize filter; unable to run program \"%s\"", @@ -441,6 +442,7 @@ __archive_read_program(struct archive_read_filter *self, const char *cmd) if (state->child == NULL) { child_stop(self, state); free(state->out_buf); + archive_string_free(&state->description); free(state); archive_set_error(&self->archive->archive, EINVAL, "Can't initialize filter; unable to run program \"%s\"", -- 2.47.2