From fa85f0132b846d854ca73307b796d97add2afcb3 Mon Sep 17 00:00:00 2001 From: Ulrich Czekalla Date: Thu, 24 Feb 2005 10:05:27 +0000 Subject: [PATCH] Prevent accessing freed memory in failure case. --- dlls/msi/action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index e773fea0fb8..92d9c987d40 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3206,7 +3206,6 @@ static UINT ACTION_DuplicateFiles(MSIPACKAGE *package) } dest = build_directory_name(2, dest_path, dest_name); - HeapFree(GetProcessHeap(), 0, dest_path); TRACE("Duplicating file %s to %s\n",debugstr_w(file_source), debugstr_w(dest)); @@ -3222,6 +3221,7 @@ static UINT ACTION_DuplicateFiles(MSIPACKAGE *package) FIXME("We should track these duplicate files as well\n"); msiobj_release(&row->hdr); + HeapFree(GetProcessHeap(),0,dest_path); HeapFree(GetProcessHeap(),0,dest); HeapFree(GetProcessHeap(),0,file_source); }