crypto/ec/ec_curve.c:227: error: NULL_DEREFERENCE
  pointer `group` last assigned on line 198 could be null and is dereferenced by call to `EC_GROUP_free()` at line 227, column 3.
Showing all 29 steps of the trace


crypto/ec/ec_curve.c:194:1: start of procedure ec_group_new_GFp_from_hex()
192.   		"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",1
193.   
194. > static EC_GROUP *ec_group_new_GFp_from_hex(const char *prime_in,
195.   	    const char *a_in, const char *b_in,
196.   	    const char *x_in, const int y_bit, const char *order_in, const BN_ULONG cofac_in)

crypto/ec/ec_curve.c:198:2: 
196.   	    const char *x_in, const int y_bit, const char *order_in, const BN_ULONG cofac_in)
197.   	{
198. > 	EC_GROUP *group=NULL;
199.   	EC_POINT *P=NULL;
200.   	BN_CTX	 *ctx=NULL;

crypto/ec/ec_curve.c:199:2: 
197.   	{
198.   	EC_GROUP *group=NULL;
199. > 	EC_POINT *P=NULL;
200.   	BN_CTX	 *ctx=NULL;
201.   	BIGNUM 	 *prime=NULL,*a=NULL,*b=NULL,*x=NULL,*order=NULL;

crypto/ec/ec_curve.c:200:2: 
198.   	EC_GROUP *group=NULL;
199.   	EC_POINT *P=NULL;
200. > 	BN_CTX	 *ctx=NULL;
201.   	BIGNUM 	 *prime=NULL,*a=NULL,*b=NULL,*x=NULL,*order=NULL;
202.   	int	 ok=0;

crypto/ec/ec_curve.c:201:2: 
199.   	EC_POINT *P=NULL;
200.   	BN_CTX	 *ctx=NULL;
201. > 	BIGNUM 	 *prime=NULL,*a=NULL,*b=NULL,*x=NULL,*order=NULL;
202.   	int	 ok=0;
203.   

crypto/ec/ec_curve.c:202:2: 
200.   	BN_CTX	 *ctx=NULL;
201.   	BIGNUM 	 *prime=NULL,*a=NULL,*b=NULL,*x=NULL,*order=NULL;
202. > 	int	 ok=0;
203.   
204.   	if ((ctx = BN_CTX_new()) == NULL) goto bn_err;

crypto/ec/ec_curve.c:204:6: Taking false branch
202.   	int	 ok=0;
203.   
204.   	if ((ctx = BN_CTX_new()) == NULL) goto bn_err;
            ^
205.   	if ((prime = BN_new()) == NULL || (a = BN_new()) == NULL || (b = BN_new()) == NULL ||
206.   		(x = BN_new()) == NULL || (order = BN_new()) == NULL) goto bn_err;

crypto/ec/ec_curve.c:205:6: Taking false branch
203.   
204.   	if ((ctx = BN_CTX_new()) == NULL) goto bn_err;
205.   	if ((prime = BN_new()) == NULL || (a = BN_new()) == NULL || (b = BN_new()) == NULL ||
            ^
206.   		(x = BN_new()) == NULL || (order = BN_new()) == NULL) goto bn_err;
207.   	

crypto/ec/ec_curve.c:205:36: Taking false branch
203.   
204.   	if ((ctx = BN_CTX_new()) == NULL) goto bn_err;
205.   	if ((prime = BN_new()) == NULL || (a = BN_new()) == NULL || (b = BN_new()) == NULL ||
                                          ^
206.   		(x = BN_new()) == NULL || (order = BN_new()) == NULL) goto bn_err;
207.   	

crypto/ec/ec_curve.c:205:62: Taking false branch
203.   
204.   	if ((ctx = BN_CTX_new()) == NULL) goto bn_err;
205.   	if ((prime = BN_new()) == NULL || (a = BN_new()) == NULL || (b = BN_new()) == NULL ||
                                                                    ^
206.   		(x = BN_new()) == NULL || (order = BN_new()) == NULL) goto bn_err;
207.   	

crypto/ec/ec_curve.c:206:3: Taking false branch
204.   	if ((ctx = BN_CTX_new()) == NULL) goto bn_err;
205.   	if ((prime = BN_new()) == NULL || (a = BN_new()) == NULL || (b = BN_new()) == NULL ||
206.   		(x = BN_new()) == NULL || (order = BN_new()) == NULL) goto bn_err;
         ^
207.   	
208.   	if (!BN_hex2bn(&prime, prime_in)) goto bn_err;

crypto/ec/ec_curve.c:206:29: Taking false branch
204.   	if ((ctx = BN_CTX_new()) == NULL) goto bn_err;
205.   	if ((prime = BN_new()) == NULL || (a = BN_new()) == NULL || (b = BN_new()) == NULL ||
206.   		(x = BN_new()) == NULL || (order = BN_new()) == NULL) goto bn_err;
                                   ^
207.   	
208.   	if (!BN_hex2bn(&prime, prime_in)) goto bn_err;

crypto/ec/ec_curve.c:208:7: Taking true branch
206.   		(x = BN_new()) == NULL || (order = BN_new()) == NULL) goto bn_err;
207.   	
208.   	if (!BN_hex2bn(&prime, prime_in)) goto bn_err;
             ^
209.   	if (!BN_hex2bn(&a, a_in)) goto bn_err;
210.   	if (!BN_hex2bn(&b, b_in)) goto bn_err;

crypto/ec/ec_curve.c:221:1: 
219.   	if (!EC_GROUP_set_generator(group, P, order, x)) goto err;
220.   	ok=1;
221. > bn_err:
222.   	if (!ok)
223.   		ECerr(EC_F_EC_GROUP_NEW_GFP_FROM_HEX, ERR_R_BN_LIB);

crypto/ec/ec_curve.c:222:7: Taking true branch
220.   	ok=1;
221.   bn_err:
222.   	if (!ok)
             ^
223.   		ECerr(EC_F_EC_GROUP_NEW_GFP_FROM_HEX, ERR_R_BN_LIB);
224.   err:

crypto/ec/ec_curve.c:223:3: 
221.   bn_err:
222.   	if (!ok)
223. > 		ECerr(EC_F_EC_GROUP_NEW_GFP_FROM_HEX, ERR_R_BN_LIB);
224.   err:
225.   	if (!ok)

crypto/err/err.c:615:1: start of procedure ERR_put_error()
  613.   /********************************************************/
  614.   
  615. > void ERR_put_error(int lib, int func, int reason, const char *file,
  616.   	     int line)
  617.   	{

crypto/err/err.c:639:2: Skipping ERR_get_state(): empty list of specs
  637.   	}
  638.   #endif
  639.   	es=ERR_get_state();
          ^
  640.   
  641.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:641:2: 
  639.   	es=ERR_get_state();
  640.   
  641. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
  642.   	if (es->top == es->bottom)
  643.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:642:6: Taking false branch
  640.   
  641.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
  642.   	if (es->top == es->bottom)
              ^
  643.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  644.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);

crypto/err/err.c:644:2: 
  642.   	if (es->top == es->bottom)
  643.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  644. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  645.   	es->err_file[es->top]=file;
  646.   	es->err_line[es->top]=line;

crypto/err/err.c:645:2: 
  643.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  644.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  645. > 	es->err_file[es->top]=file;
  646.   	es->err_line[es->top]=line;
  647.   	err_clear_data(es,es->top);

crypto/err/err.c:646:2: 
  644.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  645.   	es->err_file[es->top]=file;
  646. > 	es->err_line[es->top]=line;
  647.   	err_clear_data(es,es->top);
  648.   	}

crypto/err/err.c:647:2: Taking true branch
  645.   	es->err_file[es->top]=file;
  646.   	es->err_line[es->top]=line;
  647.   	err_clear_data(es,es->top);
          ^
  648.   	}
  649.   

crypto/err/err.c:647:2: Taking false branch
  645.   	es->err_file[es->top]=file;
  646.   	es->err_line[es->top]=line;
  647.   	err_clear_data(es,es->top);
          ^
  648.   	}
  649.   

crypto/err/err.c:648:2: return from a call to ERR_put_error
  646.   	es->err_line[es->top]=line;
  647.   	err_clear_data(es,es->top);
  648.   	}
          ^
  649.   
  650.   void ERR_clear_error(void)

crypto/ec/ec_curve.c:224:1: 
222.   	if (!ok)
223.   		ECerr(EC_F_EC_GROUP_NEW_GFP_FROM_HEX, ERR_R_BN_LIB);
224. > err:
225.   	if (!ok)
226.   		{

crypto/ec/ec_curve.c:225:7: Taking true branch
223.   		ECerr(EC_F_EC_GROUP_NEW_GFP_FROM_HEX, ERR_R_BN_LIB);
224.   err:
225.   	if (!ok)
             ^
226.   		{
227.   		EC_GROUP_free(group);

crypto/ec/ec_curve.c:227:3: 
225.   	if (!ok)
226.   		{
227. > 		EC_GROUP_free(group);
228.   		group = NULL;
229.   		}
