forked from enlightenment/efl
free getaddrinfo() results and avoid leaks in ecore_con.
This was affecting ecore_con users, specially modules that keep polling the network, like forecasts or weather. patch by manio, see bug #305. SVN revision: 40488
This commit is contained in:
parent
8ef8b1e15a
commit
4fd5d0c794
|
@ -197,7 +197,7 @@ ecore_con_info_get(Ecore_Con_Server *svr,
|
|||
if ((cbdata->pid = fork()) == 0)
|
||||
{
|
||||
Ecore_Con_Info *container;
|
||||
struct addrinfo *result;
|
||||
struct addrinfo *result = NULL;
|
||||
char service[NI_MAXSERV];
|
||||
char hbuf[NI_MAXHOST];
|
||||
char sbuf[NI_MAXSERV];
|
||||
|
@ -239,6 +239,8 @@ ecore_con_info_get(Ecore_Con_Server *svr,
|
|||
}
|
||||
|
||||
on_error:
|
||||
if (result)
|
||||
freeaddrinfo(result);
|
||||
err = write(fd[1], "", 1);
|
||||
close(fd[1]);
|
||||
# ifdef __USE_ISOC99
|
||||
|
|
Loading…
Reference in New Issue