crypto/dsa/dsa_lib.c:308: error: NULL_DEREFERENCE
  pointer `ret` last assigned on line 284 could be null and is dereferenced by call to `DH_free()` at line 308, column 5.
Showing all 10 steps of the trace


crypto/dsa/dsa_lib.c:273:1: start of procedure DSA_dup_DH()
271.   
272.   #ifndef OPENSSL_NO_DH
273. > DH *DSA_dup_DH(const DSA *r)
274.   {
275.       /*

crypto/dsa/dsa_lib.c:280:5: 
278.        */
279.   
280. >     DH *ret = NULL;
281.   
282.       if (r == NULL)

crypto/dsa/dsa_lib.c:282:9: Taking false branch
280.       DH *ret = NULL;
281.   
282.       if (r == NULL)
               ^
283.           goto err;
284.       ret = DH_new();

crypto/dsa/dsa_lib.c:284:5: 
282.       if (r == NULL)
283.           goto err;
284. >     ret = DH_new();
285.       if (ret == NULL)
286.           goto err;

crypto/dh/dh_lib.c:103:1: start of procedure DH_new()
  101.   }
  102.   
  103. > DH *DH_new(void)
  104.   {
  105.       return DH_new_method(NULL);

crypto/dh/dh_lib.c:105:5: Skipping DH_new_method(): empty list of specs
  103.   DH *DH_new(void)
  104.   {
  105.       return DH_new_method(NULL);
             ^
  106.   }
  107.   

crypto/dh/dh_lib.c:106:1: return from a call to DH_new
  104.   {
  105.       return DH_new_method(NULL);
  106. > }
  107.   
  108.   DH *DH_new_method(ENGINE *engine)

crypto/dsa/dsa_lib.c:285:9: Taking true branch
283.           goto err;
284.       ret = DH_new();
285.       if (ret == NULL)
               ^
286.           goto err;
287.       if (r->p != NULL)

crypto/dsa/dsa_lib.c:307:2: 
305.       return ret;
306.   
307. >  err:
308.       DH_free(ret);
309.       return NULL;

crypto/dsa/dsa_lib.c:308:5: 
306.   
307.    err:
308. >     DH_free(ret);
309.       return NULL;
310.   }
