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