Hans Leidekker : msi: Free the message string in ACTION_ResolveSource.

Alexandre Julliard julliard at winehq.org
Wed Sep 14 12:25:39 CDT 2011


Module: wine
Branch: master
Commit: eede401d038598a09c068fb588b05ea5d3f9357d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=eede401d038598a09c068fb588b05ea5d3f9357d

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Sep 14 12:03:54 2011 +0200

msi: Free the message string in ACTION_ResolveSource.

---

 dlls/msi/action.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 62d857a..478addd 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -5128,8 +5128,7 @@ static UINT ACTION_ResolveSource(MSIPACKAGE* package)
     attrib = GetFileAttributesW(package->db->path);
     if (attrib == INVALID_FILE_ATTRIBUTES)
     {
-        LPWSTR prompt;
-        LPWSTR msg;
+        LPWSTR prompt, msg;
         DWORD size = 0;
 
         rc = MsiSourceListGetInfoW(package->ProductCode, NULL, 
@@ -5146,17 +5145,18 @@ static UINT ACTION_ResolveSource(MSIPACKAGE* package)
             prompt = strdupW(package->db->path);
 
         msg = msi_build_error_string(package, 1302, 1, prompt);
+        msi_free(prompt);
         while(attrib == INVALID_FILE_ATTRIBUTES)
         {
             rc = MessageBoxW(NULL, msg, NULL, MB_OKCANCEL);
             if (rc == IDCANCEL)
             {
-                msi_free(prompt);
+                msi_free(msg);
                 return ERROR_INSTALL_USEREXIT;
             }
             attrib = GetFileAttributesW(package->db->path);
         }
-        msi_free(prompt);
+        msi_free(msg);
         rc = ERROR_SUCCESS;
     }
     else




More information about the wine-cvs mailing list