test/exdatatest.c:135: error: NULL_DEREFERENCE
  pointer `obj` last assigned on line 133 could be null and is dereferenced at line 135, column 5.
Showing all 14 steps of the trace


test/exdatatest.c:130:1: start of procedure MYOBJ_new()
128.   } MYOBJ;
129.   
130. > static MYOBJ *MYOBJ_new()
131.   {
132.       static int count = 0;

test/exdatatest.c:132:5: 
130.   static MYOBJ *MYOBJ_new()
131.   {
132. >     static int count = 0;
133.       MYOBJ *obj = OPENSSL_malloc(sizeof(*obj));
134.   

test/exdatatest.c:133:5: 
131.   {
132.       static int count = 0;
133. >     MYOBJ *obj = OPENSSL_malloc(sizeof(*obj));
134.   
135.       obj->id = ++count;

crypto/mem.c:169:1: start of procedure CRYPTO_malloc()
  167.   #endif
  168.   
  169. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  170.   {
  171.       void *ret = NULL;

crypto/mem.c:171:5: 
  169.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  170.   {
  171. >     void *ret = NULL;
  172.   
  173.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:173:9: Taking false branch
  171.       void *ret = NULL;
  172.   
  173.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                 ^
  174.           return malloc_impl(num, file, line);
  175.   

crypto/mem.c:176:9: Taking false branch
  174.           return malloc_impl(num, file, line);
  175.   
  176.       if (num == 0)
                 ^
  177.           return NULL;
  178.   

crypto/mem.c:180:5: 
  178.   
  179.       FAILTEST();
  180. >     allow_customize = 0;
  181.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
  182.       if (call_malloc_debug) {

crypto/mem.c:190:5: 
  188.       }
  189.   #else
  190. >     (void)(file); (void)(line);
  191.       ret = malloc(num);
  192.   #endif

crypto/mem.c:190:19: 
  188.       }
  189.   #else
  190. >     (void)(file); (void)(line);
  191.       ret = malloc(num);
  192.   #endif

crypto/mem.c:191:5: 
  189.   #else
  190.       (void)(file); (void)(line);
  191. >     ret = malloc(num);
  192.   #endif
  193.   

crypto/mem.c:194:5: 
  192.   #endif
  193.   
  194. >     return ret;
  195.   }
  196.   

crypto/mem.c:195:1: return from a call to CRYPTO_malloc
  193.   
  194.       return ret;
  195. > }
  196.   
  197.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

test/exdatatest.c:135:5: 
133.       MYOBJ *obj = OPENSSL_malloc(sizeof(*obj));
134.   
135. >     obj->id = ++count;
136.       obj->st = CRYPTO_new_ex_data(CRYPTO_EX_INDEX_APP, obj, &obj->ex_data);
137.       return obj;
