1
0
forked from bip/bip

Fix just introduced leak.

This commit is contained in:
Arnaud Cornet 2007-12-21 12:21:23 +01:00
parent 27b16a86b8
commit e6efc4b1c5

View File

@ -601,9 +601,13 @@ static int check_event_read(fd_set *fds, connection_t *cn)
static void connection_connected(connection_t *c)
{
if (c->localip)
free(c->localip);
c->localip = connection_localip(c);
c->localport = connection_localport(c);
c->remoteip = connection_remoteip(c);
if (c->remoteip)
free(c->remoteip);
c->remoteport = connection_remoteport(c);
}