Re: Memory leak in tcpip_connect_nb_to_server_with_port

Roman Shterenzon <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
blame says that it was done in r4861, and this is the relevant ChangeLog entry:


        * gwlib/socket.c: use gw_netaddr_to_octstr() instead of inet_ntop(), due
          to the fact that the later is not provided in Interix 3.



________________________________
From: Nikos Balkanas <[email protected]>
To: Roman Shterenzon <[email protected]>; Kannel Devel <[email protected]>
Sent: Saturday, April 16, 2011 3:17 PM
Subject: Re: Memory leak in tcpip_connect_nb_to_server_with_port

Interesting... ip2 used to be a C-string with memory allocated from the stack. Somehow, sometime, someone changed that to Octstr. Cannot find the record of that change in Redmine.

Anyway, good call. +1

Nikos
----- Original Message ----- From: Roman Shterenzon
To: Kannel Devel
Sent: Saturday, April 16, 2011 12:34 PM
Subject: Memory leak in tcpip_connect_nb_to_server_with_port


It looks like it leaks the IP string every time.


Please review the proposed fix.


--Roman
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.