[Skyeye-developer] Possible memory leak in Skyeye 1.2.2
kang shuo
blackfin.kang at gmail.com
Fri Apr 20 10:18:03 CST 2007
On 4/19/07, Juan Castillo <castillo at teisa.unican.es> wrote:
> 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.
Yes, I think you are right. Thanks a lot ! We will fix it soon in the
source repository.
>
> Thank you.
>
> _______________________________________________
> Skyeye-developer mailing list
> Skyeye-developer at lists.gro.clinux.org
> http://lists.gro.clinux.org/cgi-bin/mailman/listinfo/skyeye-developer
>
More information about the Skyeye-developer
mailing list