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


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

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

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

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

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

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

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

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

crypto/x509/x509_cmp.c:259:2: return from a call to X509_get_pubkey
  257.   		return(NULL);
  258.   	return(X509_PUBKEY_get(x->cert_info->key));
  259.   	}
          ^
  260.   
  261.   int X509_check_private_key(X509 *x, EVP_PKEY *k)

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