msi: Avoid a potential NULL pointer dereference (coccicheck).
Michael Stefaniuc
mstefani at redhat.de
Wed May 19 18:15:46 CDT 2010
The last "goto done" is for si == NULL. When MSI_GetSummaryInformationW
returns NULL there is a crash.
---
dlls/msi/msi.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 3170e6d..9c08d1b 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -551,7 +551,8 @@ static UINT MSI_ApplicablePatchW( MSIPACKAGE *package, LPCWSTR patch )
done:
msiobj_release( &patch_db->hdr );
- msiobj_release( &si->hdr );
+ if (si)
+ msiobj_release( &si->hdr );
return r;
}
--
1.7.1
More information about the wine-patches
mailing list