test/evp_test.c:884: error: NULL_DEREFERENCE
  pointer `mdat` last assigned on line 883 could be null and is dereferenced at line 884, column 5.
Showing all 16 steps of the trace


test/evp_test.c:852:1: start of procedure mac_test_init()
850.   } MAC_DATA;
851.   
852. > static int mac_test_init(EVP_TEST *t, const char *alg)
853.   {
854.       int type;

test/evp_test.c:857:9: Taking true branch
855.       MAC_DATA *mdat;
856.   
857.       if (strcmp(alg, "HMAC") == 0) {
               ^
858.           type = EVP_PKEY_HMAC;
859.       } else if (strcmp(alg, "CMAC") == 0) {

test/evp_test.c:858:9: 
856.   
857.       if (strcmp(alg, "HMAC") == 0) {
858. >         type = EVP_PKEY_HMAC;
859.       } else if (strcmp(alg, "CMAC") == 0) {
860.   #ifndef OPENSSL_NO_CMAC

test/evp_test.c:883:5: 
881.           return 0;
882.   
883. >     mdat = OPENSSL_zalloc(sizeof(*mdat));
884.       mdat->type = type;
885.       mdat->controls = sk_OPENSSL_STRING_new_null();

crypto/mem.c:228:1: start of procedure CRYPTO_zalloc()
  226.   }
  227.   
  228. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  229.   {
  230.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:230:5: 
  228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  229.   {
  230. >     void *ret = CRYPTO_malloc(num, file, line);
  231.   
  232.       FAILTEST();

crypto/mem.c:192:1: start of procedure CRYPTO_malloc()
    190.   #endif
    191.   
    192. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    193.   {
    194.       void *ret = NULL;

crypto/mem.c:194:5: 
    192.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    193.   {
    194. >     void *ret = NULL;
    195.   
    196.       INCREMENT(malloc_count);

crypto/mem.c:197:9: Taking true branch
    195.   
    196.       INCREMENT(malloc_count);
    197.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    198.           return malloc_impl(num, file, line);
    199.   

crypto/mem.c:197:32: Taking true branch
    195.   
    196.       INCREMENT(malloc_count);
    197.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                                          ^
    198.           return malloc_impl(num, file, line);
    199.   

crypto/mem.c:198:9: Skipping __function_pointer__(): unresolved function pointer
    196.       INCREMENT(malloc_count);
    197.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
    198.           return malloc_impl(num, file, line);
                   ^
    199.   
    200.       if (num == 0)

crypto/mem.c:226:1: return from a call to CRYPTO_malloc
    224.   
    225.       return ret;
    226. > }
    227.   
    228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:233:9: Taking false branch
  231.   
  232.       FAILTEST();
  233.       if (ret != NULL)
                 ^
  234.           memset(ret, 0, num);
  235.       return ret;

crypto/mem.c:235:5: 
  233.       if (ret != NULL)
  234.           memset(ret, 0, num);
  235. >     return ret;
  236.   }
  237.   

crypto/mem.c:236:1: return from a call to CRYPTO_zalloc
  234.           memset(ret, 0, num);
  235.       return ret;
  236. > }
  237.   
  238.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

test/evp_test.c:884:5: 
882.   
883.       mdat = OPENSSL_zalloc(sizeof(*mdat));
884. >     mdat->type = type;
885.       mdat->controls = sk_OPENSSL_STRING_new_null();
886.       t->data = mdat;
