From d9c52bfa70d694e89511129e8f04caa6b22ce053 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Thu, 17 Dec 2009 20:00:45 -0800 Subject: [PATCH] msi: Free the current filename if we choose to not extract the file. --- dlls/msi/media.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/msi/media.c b/dlls/msi/media.c index 67d73ccfcaf..0a6c4314fbc 100644 --- a/dlls/msi/media.c +++ b/dlls/msi/media.c @@ -334,7 +334,12 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint, data->curfile = strdupAtoW(pfdin->psz1); if (!data->cb(data->package, data->curfile, MSICABEXTRACT_BEGINEXTRACT, &path, &attrs, data->user)) + { + /* We're not extracting this file, so free the filename. */ + msi_free(data->curfile); + data->curfile = NULL; goto done; + } TRACE("extracting %s\n", debugstr_w(path));