1
0
Эх сурвалжийг харах

Ticket #48048 - Fix coverity issues - 2015/2/24

Coverity defect 13079 - Explicit null dereferenced (FORWARD_NULL)
Description: Added NULL check for ctx
modified: chainingdb_prev_search_results in plugins/chainingdb/cb_search.c
Noriko Hosoi 10 жил өмнө
parent
commit
a10a1de9f1

+ 3 - 1
ldap/servers/plugins/chainingdb/cb_search.c

@@ -792,6 +792,8 @@ chainingdb_prev_search_results ( Slapi_PBlock *pb )
 
     slapi_pblock_get( pb, SLAPI_SEARCH_RESULT_SET, &ctx );
     slapi_pblock_get( pb, SLAPI_SEARCH_RESULT_ENTRY, &entry );
-    ctx->readahead = entry;
+    if (ctx) {
+        ctx->readahead = entry;
+    }
     return;
 }