Browse Source

Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939

https://bugzilla.redhat.com/show_bug.cgi?id=613056
Resolves: bug 613056
Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
description: Catch possible NULL pointer in import_monitor_threads().
Endi S. Dewata 15 years ago
parent
commit
bfac0d544d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      ldap/servers/slapd/back-ldbm/import.c

+ 5 - 0
ldap/servers/slapd/back-ldbm/import.c

@@ -712,8 +712,13 @@ static int import_monitor_threads(ImportJob *job, int *status)
 
     if (job->flags & FLAG_USE_FILES)
         PR_ASSERT(producer != NULL);
+
     PR_ASSERT(foreman != NULL);
 
+    if (!foreman) {
+        goto error_abort;
+    }
+
     time(&last_time);
     job->start_time = last_time;
     import_clear_progress_history(job);