Memory leak in wap_push_ppg_pushuser_list_add() ?
"Paul Keogh" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
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.
Paul Keogh
ANAM Wireless Internet Solutions
http://www.anam.com
+353 1 284 7555 (wired) +353 86 234 6047 (wireless)
Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland