[PATCH] msi: Check comp for NULL from msi_get_loaded_component (Coverity)

Marcus Meissner marcus at jet.franken.de
Wed May 18 02:57:44 CDT 2011


Hi,

CID 5086. we check comp for NULL in all other places, so do here
too.

Ciao, Marcus
---
 dlls/msi/files.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index ff21604..06854be 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -1180,6 +1180,9 @@ static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
     install_mode = MSI_RecordGetInteger(row, 5);
 
     comp = msi_get_loaded_component(package, component);
+    if (!comp)
+        return ERROR_SUCCESS;
+
     if (!comp->Enabled)
     {
         TRACE("component is disabled\n");
-- 
1.7.3.4



More information about the wine-patches mailing list