[Skyeye-developer] Possible memory leak in Skyeye 1.2.2

Juan Castillo castillo at teisa.unican.es
Thu Apr 19 23:24:49 CST 2007


Hello everybody.

I am working with Skyeye v1.2.2 (I think it is the last one). I am not an 
expert programmer, but I think there is a memory leakage in file:
	skyeye_1_2_2_Rel/arch/arm/common/arminit.c

in function:
	ARMul_State * ARMul_NewState (void)

in line 159:
	state->mem_bank = (mem_config_t *) malloc (sizeof (mem_config_t));

After return from function, in file "arm_arch_interface.c", "state->mem_bank" 
is assigned with the address of "arm_mem", which is a global mem_config_t 
struct, so pointer to previously reserved area by malloc is lost.

I have deleted malloc line and Skyeye seems to compile and run without 
problems. Anyway, I report this because maybe I am wrong and I would like 
developers to analyze it.

Thank you.



More information about the Skyeye-developer mailing list