crypto/x509/x509_cmp.c:250: error: NULL_DEREFERENCE
  pointer `xk` last assigned on line 249 could be null and is dereferenced at line 250, column 6.
Showing all 10 steps of the trace


crypto/x509/x509_cmp.c:244:1: start of procedure X509_check_private_key()
242.   	}
243.   
244. > int X509_check_private_key(X509 *x, EVP_PKEY *k)
245.   	{
246.   	EVP_PKEY *xk=NULL;

crypto/x509/x509_cmp.c:246:2: 
244.   int X509_check_private_key(X509 *x, EVP_PKEY *k)
245.   	{
246. > 	EVP_PKEY *xk=NULL;
247.   	int ok=0;
248.   

crypto/x509/x509_cmp.c:247:2: 
245.   	{
246.   	EVP_PKEY *xk=NULL;
247. > 	int ok=0;
248.   
249.   	xk=X509_get_pubkey(x);

crypto/x509/x509_cmp.c:249:2: 
247.   	int ok=0;
248.   
249. > 	xk=X509_get_pubkey(x);
250.   	if (xk->type != k->type)
251.   	    {

crypto/x509/x509_cmp.c:237:1: start of procedure X509_get_pubkey()
  235.   	}
  236.   
  237. > EVP_PKEY *X509_get_pubkey(X509 *x)
  238.   	{
  239.   	if ((x == NULL) || (x->cert_info == NULL))

crypto/x509/x509_cmp.c:239:7: Taking false branch
  237.   EVP_PKEY *X509_get_pubkey(X509 *x)
  238.   	{
  239.   	if ((x == NULL) || (x->cert_info == NULL))
               ^
  240.   		return(NULL);
  241.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:239:22: Taking true branch
  237.   EVP_PKEY *X509_get_pubkey(X509 *x)
  238.   	{
  239.   	if ((x == NULL) || (x->cert_info == NULL))
                              ^
  240.   		return(NULL);
  241.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:240:3: 
  238.   	{
  239.   	if ((x == NULL) || (x->cert_info == NULL))
  240. > 		return(NULL);
  241.   	return(X509_PUBKEY_get(x->cert_info->key));
  242.   	}

crypto/x509/x509_cmp.c:242:2: return from a call to X509_get_pubkey
  240.   		return(NULL);
  241.   	return(X509_PUBKEY_get(x->cert_info->key));
  242.   	}
          ^
  243.   
  244.   int X509_check_private_key(X509 *x, EVP_PKEY *k)

crypto/x509/x509_cmp.c:250:6: 
248.   
249.   	xk=X509_get_pubkey(x);
250. > 	if (xk->type != k->type)
251.   	    {
252.   	    SSLerr(X509_F_X509_CHECK_PRIVATE_KEY,X509_R_KEY_TYPE_MISMATCH);
