https://git.reactos.org/?p=reactos.git;a=commitdiff;h=64fe3dd2077852169686ed421295643474f2440c

commit 64fe3dd2077852169686ed421295643474f2440c
Author:     winesync <[email protected]>
AuthorDate: Sun Mar 13 18:51:49 2022 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Sun Mar 20 19:28:23 2022 +0100

    [WINESYNC] msi: Fix a leak on error path (Coverity).
    
    Signed-off-by: Sven Baars <[email protected]>
    Signed-off-by: Hans Leidekker <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id fe91ae51f1553875c1858df264c0603877d50737 by Sven Baars 
<[email protected]>
---
 dll/win32/msi/dialog.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c
index f35ae6f2466..ca7ade83e42 100644
--- a/dll/win32/msi/dialog.c
+++ b/dll/win32/msi/dialog.c
@@ -4036,7 +4036,11 @@ static msi_dialog *dialog_create( MSIPACKAGE *package, 
const WCHAR *name, msi_di
     msiobj_release( &rec->hdr );
 
     rec = MSI_CreateRecord(2);
-    if (!rec) return NULL;
+    if (!rec)
+    {
+        msi_dialog_destroy(dialog);
+        return NULL;
+    }
     MSI_RecordSetStringW(rec, 1, name);
     MSI_RecordSetStringW(rec, 2, szDialogCreated);
     MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONSTART, rec);

Reply via email to