Module: wine Branch: master Commit: a7fe36b327b68df76d28c5b9d287272544326256 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a7fe36b327b68df76d28c5b9d2...
Author: James Hawkins truiken@gmail.com Date: Sun Dec 13 19:35:33 2009 -0800
msi: Don't free str until the last instance of its use.
---
dlls/msi/automation.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c index 3b40384..5305f9c 100644 --- a/dlls/msi/automation.c +++ b/dlls/msi/automation.c @@ -2084,7 +2084,7 @@ static HRESULT InstallerImpl_ProductInfo(WORD wFlags, UINT ret; HRESULT hr; DWORD size; - LPWSTR str; + LPWSTR str = NULL; VARIANTARG varg0, varg1;
if (!(wFlags & DISPATCH_PROPERTYGET)) @@ -2118,8 +2118,6 @@ static HRESULT InstallerImpl_ProductInfo(WORD wFlags, }
ret = MsiGetProductInfoW(V_BSTR(&varg0), V_BSTR(&varg1), str, &size); - msi_free(str); - if (ret != ERROR_SUCCESS) { hr = DISP_E_EXCEPTION; @@ -2130,6 +2128,7 @@ static HRESULT InstallerImpl_ProductInfo(WORD wFlags, hr = S_OK;
done: + msi_free(str); VariantClear(&varg0); VariantClear(&varg1); return hr;