Eggdev: Re: [eggheads-patches] PATCH 1.6/1.7: Leaked socklist socket

Will Buckner wcc at techmonkeys.org
Sat Apr 16 13:35:44 CST 2005


Bryan Drewery wrote:

> Nope.
> **** Access denied: Insufficient Karma (lordares|eggdrop1.7/src)
> cvs commit: Pre-commit check failed
>
> Still get that for 1.7 :P
>
> Not in 1.6 either.
>
>
> ------
> Bryan Drewery
>
>
> On Fri, 15 Apr 2005, Will Buckner wrote:
>
>> Bryan Drewery wrote:
>>
>>> open_telnet_raw() is passed a socket from getsock()
>>> if the socket is failed in bind() open_telnet_raw does a return -1, 
>>> leaving the socket floating around in the socklist.
>>> This patch fixes for both trees.
>>>
>>> diff -u -d -p -r1.12 net.c
>>> --- src/net.c   26 Nov 2004 05:35:27 -0000      1.12
>>> +++ src/net.c   25 Jan 2005 17:41:33 -0000
>>> @@ -394,8 +394,10 @@ int open_telnet_raw(int sock, char *serv
>>>
>>>    name.sin_family = AF_INET;
>>>    name.sin_addr.s_addr = (myip[0] ? getmyip() : INADDR_ANY);
>>> -  if (bind(sock, (struct sockaddr *) &name, sizeof(name)) < 0)
>>> +  if (bind(sock, (struct sockaddr *) &name, sizeof(name)) < 0) {
>>> +    killsock(sock);
>>>      return -1;
>>> +  }
>>>    egg_bzero((char *) &name, sizeof(struct sockaddr_in));
>>>
>>>    name.sin_family = AF_INET;
>>>
>>>
>>> ------
>>> Bryan Drewery
>>>
>> Did this ever get applied?
>>
>> Will
>>
>
I'll apply now to both trees.



More information about the Eggdev mailing list