crypto/dh/dh_lib.c:200: error: NULL_DEREFERENCE
  pointer `meth` last assigned on line 199 could be null and is dereferenced at line 200, column 5.
Showing all 28 steps of the trace


crypto/dh/dh_lib.c:181:1: start of procedure DH_free()
179.   	}
180.   
181. > void DH_free(DH *r)
182.   	{
183.   	const DH_METHOD *meth;

crypto/dh/dh_lib.c:185:5: Taking false branch
183.   	const DH_METHOD *meth;
184.   	int i;
185.   	if(r == NULL) return;
           ^
186.   	i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_DH);
187.   #ifdef REF_PRINT

crypto/dh/dh_lib.c:186:2: 
184.   	int i;
185.   	if(r == NULL) return;
186. > 	i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_DH);
187.   #ifdef REF_PRINT
188.   	REF_PRINT("DH",r);

crypto/cryptlib.c:415:1: start of procedure CRYPTO_add_lock()
  413.   	}
  414.   
  415. > int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
  416.   	     int line)
  417.   	{

crypto/cryptlib.c:418:2: 
  416.   	     int line)
  417.   	{
  418. > 	int ret = 0;
  419.   
  420.   	if (add_lock_callback != NULL)

crypto/cryptlib.c:420:6: Taking true branch
  418.   	int ret = 0;
  419.   
  420.   	if (add_lock_callback != NULL)
              ^
  421.   		{
  422.   #ifdef LOCK_DEBUG

crypto/cryptlib.c:426:3: Skipping __function_pointer__(): unresolved function pointer
  424.   #endif
  425.   
  426.   		ret=add_lock_callback(pointer,amount,type,file,line);
           ^
  427.   #ifdef LOCK_DEBUG
  428.   		fprintf(stderr,"ladd:%08lx:%2d+%2d->%2d %-18s %s:%d\n",

crypto/cryptlib.c:434:3: 
  432.   			file,line);
  433.   #endif
  434. > 		*pointer=ret;
  435.   		}
  436.   	else

crypto/cryptlib.c:451:2: 
  449.   		CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,file,line);
  450.   		}
  451. > 	return(ret);
  452.   	}
  453.   

crypto/cryptlib.c:452:2: return from a call to CRYPTO_add_lock
  450.   		}
  451.   	return(ret);
  452.   	}
          ^
  453.   
  454.   const char *CRYPTO_get_lock_name(int type)

crypto/dh/dh_lib.c:190:6: Taking false branch
188.   	REF_PRINT("DH",r);
189.   #endif
190.   	if (i > 0) return;
            ^
191.   #ifdef REF_CHECK
192.   	if (i < 0)

crypto/dh/dh_lib.c:199:2: 
197.   #endif
198.   
199. > 	meth = ENGINE_get_DH(r->engine);
200.   	if(meth->finish) meth->finish(r);
201.   	ENGINE_finish(r->engine);

crypto/engine/engine_list.c:585:1: start of procedure ENGINE_get_DH()
  583.   	}
  584.   
  585. > const DH_METHOD *ENGINE_get_DH(ENGINE *e)
  586.   	{
  587.   	if(e == NULL)

crypto/engine/engine_list.c:587:5: Taking true branch
  585.   const DH_METHOD *ENGINE_get_DH(ENGINE *e)
  586.   	{
  587.   	if(e == NULL)
             ^
  588.   		{
  589.   		ENGINEerr(ENGINE_F_ENGINE_GET_DH,

crypto/engine/engine_list.c:589:3: 
  587.   	if(e == NULL)
  588.   		{
  589. > 		ENGINEerr(ENGINE_F_ENGINE_GET_DH,
  590.   			ERR_R_PASSED_NULL_PARAMETER);
  591.   		return NULL;

crypto/err/err.c:355:1: start of procedure ERR_put_error()
    353.   /********************************************************/
    354.   
    355. > void ERR_put_error(int lib, int func, int reason, const char *file,
    356.   	     int line)
    357.   	{

crypto/err/err.c:379:2: Skipping ERR_get_state(): empty list of specs
    377.   	}
    378.   #endif
    379.   	es=ERR_get_state();
            ^
    380.   
    381.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:381:2: 
    379.   	es=ERR_get_state();
    380.   
    381. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
    382.   	if (es->top == es->bottom)
    383.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:382:6: Taking false branch
    380.   
    381.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
    382.   	if (es->top == es->bottom)
                ^
    383.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    384.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);

crypto/err/err.c:384:2: 
    382.   	if (es->top == es->bottom)
    383.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    384. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    385.   	es->err_file[es->top]=file;
    386.   	es->err_line[es->top]=line;

crypto/err/err.c:385:2: 
    383.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    384.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    385. > 	es->err_file[es->top]=file;
    386.   	es->err_line[es->top]=line;
    387.   	err_clear_data(es,es->top);

crypto/err/err.c:386:2: 
    384.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    385.   	es->err_file[es->top]=file;
    386. > 	es->err_line[es->top]=line;
    387.   	err_clear_data(es,es->top);
    388.   	}

crypto/err/err.c:387:2: Taking true branch
    385.   	es->err_file[es->top]=file;
    386.   	es->err_line[es->top]=line;
    387.   	err_clear_data(es,es->top);
            ^
    388.   	}
    389.   

crypto/err/err.c:387:2: Taking false branch
    385.   	es->err_file[es->top]=file;
    386.   	es->err_line[es->top]=line;
    387.   	err_clear_data(es,es->top);
            ^
    388.   	}
    389.   

crypto/err/err.c:388:2: return from a call to ERR_put_error
    386.   	es->err_line[es->top]=line;
    387.   	err_clear_data(es,es->top);
    388.   	}
            ^
    389.   
    390.   void ERR_clear_error(void)

crypto/engine/engine_list.c:591:3: 
  589.   		ENGINEerr(ENGINE_F_ENGINE_GET_DH,
  590.   			ERR_R_PASSED_NULL_PARAMETER);
  591. > 		return NULL;
  592.   		}
  593.   	return e->dh_meth;

crypto/engine/engine_list.c:594:2: return from a call to ENGINE_get_DH
  592.   		}
  593.   	return e->dh_meth;
  594.   	}
          ^
  595.   
  596.   RAND_METHOD *ENGINE_get_RAND(ENGINE *e)

crypto/dh/dh_lib.c:200:5: Taking false branch
198.   
199.   	meth = ENGINE_get_DH(r->engine);
200.   	if(meth->finish) meth->finish(r);
           ^
201.   	ENGINE_finish(r->engine);
202.   
