Fix some issues reported by cppcheck
[citadel.git] / citadel / ecrash.c
index b9decd1bfb6fac625e97cec6c7e309186118cebf..ec91a02e4418bc166e9e0289fc5834526b7cf8cc 100644 (file)
@@ -393,6 +393,7 @@ int eCrash_Init(eCrashParameters *params)
 
        DPRINTF(ECRASH_DEBUG_VERY_VERBOSE,"Init Starting params = %p\n", params);
 
 
        DPRINTF(ECRASH_DEBUG_VERY_VERBOSE,"Init Starting params = %p\n", params);
 
+       if (params == NULL) return -1;
        // Allocate our backtrace area
        gbl_backtraceBuffer = malloc(sizeof(void *) * (params->maxStackDepth+5));
 
        // Allocate our backtrace area
        gbl_backtraceBuffer = malloc(sizeof(void *) * (params->maxStackDepth+5));