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


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

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

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

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

crypto/x509/x509_cmp.c:260:1: start of procedure X509_get_pubkey()
  258.   	}
  259.   
  260. > EVP_PKEY *X509_get_pubkey(X509 *x)
  261.   	{
  262.   	if ((x == NULL) || (x->cert_info == NULL))

crypto/x509/x509_cmp.c:262:7: Taking false branch
  260.   EVP_PKEY *X509_get_pubkey(X509 *x)
  261.   	{
  262.   	if ((x == NULL) || (x->cert_info == NULL))
               ^
  263.   		return(NULL);
  264.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:262:22: Taking true branch
  260.   EVP_PKEY *X509_get_pubkey(X509 *x)
  261.   	{
  262.   	if ((x == NULL) || (x->cert_info == NULL))
                              ^
  263.   		return(NULL);
  264.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:263:3: 
  261.   	{
  262.   	if ((x == NULL) || (x->cert_info == NULL))
  263. > 		return(NULL);
  264.   	return(X509_PUBKEY_get(x->cert_info->key));
  265.   	}

crypto/x509/x509_cmp.c:265:2: return from a call to X509_get_pubkey
  263.   		return(NULL);
  264.   	return(X509_PUBKEY_get(x->cert_info->key));
  265.   	}
          ^
  266.   
  267.   int X509_check_private_key(X509 *x, EVP_PKEY *k)

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