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


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

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

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

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

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

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

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

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

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

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