crypto/asn1/x_pkey.c:88: error: NULL_DEREFERENCE
  pointer `ret` last assigned on line 69 could be null and is dereferenced by call to `X509_PKEY_free()` at line 88, column 5.
Showing all 15 steps of the trace


crypto/asn1/x_pkey.c:65:1: start of procedure X509_PKEY_new()
63.   #include <openssl/x509.h>
64.   
65. > X509_PKEY *X509_PKEY_new(void)
66.   {
67.       X509_PKEY *ret = NULL;

crypto/asn1/x_pkey.c:67:5: 
65.   X509_PKEY *X509_PKEY_new(void)
66.   {
67. >     X509_PKEY *ret = NULL;
68.   
69.       ret = OPENSSL_malloc(sizeof(X509_PKEY));

crypto/asn1/x_pkey.c:69:5: 
67.       X509_PKEY *ret = NULL;
68.   
69. >     ret = OPENSSL_malloc(sizeof(X509_PKEY));
70.       if (!ret)
71.           goto err;

crypto/mem.c:327:1: start of procedure CRYPTO_malloc()
  325.   }
  326.   
  327. > void *CRYPTO_malloc(int num, const char *file, int line)
  328.   {
  329.       void *ret = NULL;

crypto/mem.c:329:5: 
  327.   void *CRYPTO_malloc(int num, const char *file, int line)
  328.   {
  329. >     void *ret = NULL;
  330.   
  331.       if (num <= 0)

crypto/mem.c:331:9: Taking false branch
  329.       void *ret = NULL;
  330.   
  331.       if (num <= 0)
                 ^
  332.           return NULL;
  333.   

crypto/mem.c:334:9: Taking false branch
  332.           return NULL;
  333.   
  334.       if (allow_customize)
                 ^
  335.           allow_customize = 0;
  336.       if (malloc_debug_func != NULL) {

crypto/mem.c:336:9: Taking false branch
  334.       if (allow_customize)
  335.           allow_customize = 0;
  336.       if (malloc_debug_func != NULL) {
                 ^
  337.           if (allow_customize_debug)
  338.               allow_customize_debug = 0;

crypto/mem.c:341:5: Skipping __function_pointer__(): unresolved function pointer
  339.           malloc_debug_func(NULL, num, file, line, 0);
  340.       }
  341.       ret = malloc_ex_func(num, file, line);
             ^
  342.   #ifdef LEVITTE_DEBUG_MEM
  343.       fprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\n", ret, num);

crypto/mem.c:345:9: Taking false branch
  343.       fprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\n", ret, num);
  344.   #endif
  345.       if (malloc_debug_func != NULL)
                 ^
  346.           malloc_debug_func(ret, num, file, line, 1);
  347.   

crypto/mem.c:360:5: 
  358.   #endif
  359.   
  360. >     return ret;
  361.   }
  362.   

crypto/mem.c:361:1: return from a call to CRYPTO_malloc
  359.   
  360.       return ret;
  361. > }
  362.   
  363.   char *CRYPTO_strdup(const char *str, const char *file, int line)

crypto/asn1/x_pkey.c:70:10: Taking true branch
68.   
69.       ret = OPENSSL_malloc(sizeof(X509_PKEY));
70.       if (!ret)
               ^
71.           goto err;
72.       memset(ret, 0, sizeof(X509_PKEY));

crypto/asn1/x_pkey.c:87:1: 
85.       ret->references = 1;
86.       return ret;
87. > err:
88.       X509_PKEY_free(ret);
89.       ASN1err(ASN1_F_X509_PKEY_NEW, ERR_R_MALLOC_FAILURE);

crypto/asn1/x_pkey.c:88:5: 
86.       return ret;
87.   err:
88. >     X509_PKEY_free(ret);
89.       ASN1err(ASN1_F_X509_PKEY_NEW, ERR_R_MALLOC_FAILURE);
90.       return NULL;
