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


crypto/x509/x509_cmp.c:264:1: start of procedure X509_check_private_key()
262.   	}
263.   
264. > int X509_check_private_key(X509 *x, EVP_PKEY *k)
265.   	{
266.   	EVP_PKEY *xk=NULL;

crypto/x509/x509_cmp.c:266:2: 
264.   int X509_check_private_key(X509 *x, EVP_PKEY *k)
265.   	{
266. > 	EVP_PKEY *xk=NULL;
267.   	int ok=0;
268.   

crypto/x509/x509_cmp.c:267:2: 
265.   	{
266.   	EVP_PKEY *xk=NULL;
267. > 	int ok=0;
268.   
269.   	xk=X509_get_pubkey(x);

crypto/x509/x509_cmp.c:269:2: 
267.   	int ok=0;
268.   
269. > 	xk=X509_get_pubkey(x);
270.   	if (xk->type != k->type)
271.   	    {

crypto/x509/x509_cmp.c:251:1: start of procedure X509_get_pubkey()
  249.   	}
  250.   
  251. > EVP_PKEY *X509_get_pubkey(X509 *x)
  252.   	{
  253.   	if ((x == NULL) || (x->cert_info == NULL))

crypto/x509/x509_cmp.c:253:7: Taking false branch
  251.   EVP_PKEY *X509_get_pubkey(X509 *x)
  252.   	{
  253.   	if ((x == NULL) || (x->cert_info == NULL))
               ^
  254.   		return(NULL);
  255.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:253:22: Taking true branch
  251.   EVP_PKEY *X509_get_pubkey(X509 *x)
  252.   	{
  253.   	if ((x == NULL) || (x->cert_info == NULL))
                              ^
  254.   		return(NULL);
  255.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:254:3: 
  252.   	{
  253.   	if ((x == NULL) || (x->cert_info == NULL))
  254. > 		return(NULL);
  255.   	return(X509_PUBKEY_get(x->cert_info->key));
  256.   	}

crypto/x509/x509_cmp.c:256:2: return from a call to X509_get_pubkey
  254.   		return(NULL);
  255.   	return(X509_PUBKEY_get(x->cert_info->key));
  256.   	}
          ^
  257.   
  258.   ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x)

crypto/x509/x509_cmp.c:270:6: 
268.   
269.   	xk=X509_get_pubkey(x);
270. > 	if (xk->type != k->type)
271.   	    {
272.   	    X509err(X509_F_X509_CHECK_PRIVATE_KEY,X509_R_KEY_TYPE_MISMATCH);
