crypto/x509/x509_req.c:123: error: NULL_DEREFERENCE
  pointer `xk` last assigned on line 122 could be null and is dereferenced by call to `EVP_PKEY_cmp()` at line 123, column 10.
Showing all 12 steps of the trace


crypto/x509/x509_req.c:117:1: start of procedure X509_REQ_check_private_key()
115.   	}
116.   
117. > int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
118.   	{
119.   	EVP_PKEY *xk=NULL;

crypto/x509/x509_req.c:119:2: 
117.   int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
118.   	{
119. > 	EVP_PKEY *xk=NULL;
120.   	int ok=0;
121.   

crypto/x509/x509_req.c:120:2: 
118.   	{
119.   	EVP_PKEY *xk=NULL;
120. > 	int ok=0;
121.   
122.   	xk=X509_REQ_get_pubkey(x);

crypto/x509/x509_req.c:122:2: 
120.   	int ok=0;
121.   
122. > 	xk=X509_REQ_get_pubkey(x);
123.   	switch (EVP_PKEY_cmp(xk, k))
124.   		{

crypto/x509/x509_req.c:110:1: start of procedure X509_REQ_get_pubkey()
  108.   	}
  109.   
  110. > EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
  111.   	{
  112.   	if ((req == NULL) || (req->req_info == NULL))

crypto/x509/x509_req.c:112:7: Taking false branch
  110.   EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
  111.   	{
  112.   	if ((req == NULL) || (req->req_info == NULL))
               ^
  113.   		return(NULL);
  114.   	return(X509_PUBKEY_get(req->req_info->pubkey));

crypto/x509/x509_req.c:112:24: Taking true branch
  110.   EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
  111.   	{
  112.   	if ((req == NULL) || (req->req_info == NULL))
                                ^
  113.   		return(NULL);
  114.   	return(X509_PUBKEY_get(req->req_info->pubkey));

crypto/x509/x509_req.c:113:3: 
  111.   	{
  112.   	if ((req == NULL) || (req->req_info == NULL))
  113. > 		return(NULL);
  114.   	return(X509_PUBKEY_get(req->req_info->pubkey));
  115.   	}

crypto/x509/x509_req.c:115:2: return from a call to X509_REQ_get_pubkey
  113.   		return(NULL);
  114.   	return(X509_PUBKEY_get(req->req_info->pubkey));
  115.   	}
          ^
  116.   
  117.   int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)

crypto/x509/x509_req.c:123:2: 
121.   
122.   	xk=X509_REQ_get_pubkey(x);
123. > 	switch (EVP_PKEY_cmp(xk, k))
124.   		{
125.   	case 1:

crypto/evp/p_lib.c:159:1: start of procedure EVP_PKEY_cmp()
  157.   	}
  158.   
  159. > int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
  160.   	{
  161.   	if (a->type != b->type)

crypto/evp/p_lib.c:161:6: 
  159.   int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
  160.   	{
  161. > 	if (a->type != b->type)
  162.   		return -1;
  163.   
