Re: Memory leak in wap_push_ppg_pushuser_list_add() ?

Aarno Syvänen <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Wiral Ltd
Message-ID <[email protected]>
Paul Keogh wrote:
> 
> I think the line
> 
>     next_try = dict_create(number_of_pushes, NULL);
> 
> should be replaced with
> 
>     next_try = dict_create(number_of_pushes, octstr_destroy_item);
> 
> as otherwise the memory management for the next_try Dict is incomplete
> and results in a memory leak for multiple failed authentications.
> 
> You'll can also remove
> 
> listed:
>         ...
>         octstr_destroy(next_time_os); // Remove this !
> 
> from wap_push_ppg_pushuser_authenticate() so you don't conflict
> with the dict_() internal item management.
> 
> This fix cured a leak reported by Purify.

You are rigth. Thanks.

Aarno
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.