[OpenSIPS-Devel] publish_cbparam possible mem-leak

Anca Vamanu anca at opensips.org
Mon Aug 24 18:08:40 CEST 2009


Hi Sanislaw,

It's hard to believe that there is a leak there, since in 1.5.2 the 
callback function frees the parameter in all cases. Maybe you stopped 
the server before a reply was received and this record has not been 
freed. To check it for sure, run the server for a longger period of time 
with activity to generate publishes and check if there are more reports 
for this allocation.

regards,
Anca

Stanis?aw Pitucha wrote:
> Hi,
>
> I've found this allocation being left in the shm - this is just after
> running for ~10 seconds, but same allocation repeats later on:
>
> Memory status (shm):
> qm_status (0xaff32000):
>  heap size= 134217728
>  used= 392, used+overhead=352444, free=133865284
>  max used (+overhead)= 2317460
> dumping all alloc'ed. fragments:
>       0. N  address=0xaff6640c frag=0xaff663f4 size=4 used=1
>             alloc'd from mem/shm_mem.c: shm_mem_init_mallocs(196)
>         start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
>     2853. N  address=0xb015e1fc frag=0xb015e1e4 size=388 used=1
>             alloc'd from send_publish.c: publish_cbparam(644)
>         start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
>
> It's opensips 1.5.2 so the "send_publish.c: publish_cbparam(644)" line
> should be:
>
> ...
>   cb_param= (ua_pres_t*)shm_malloc(size);
>    if(cb_param== NULL)
> ...
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>   




More information about the Devel mailing list