Changeset 620 for trunk/sx/io.c

Show
Ignore:
Timestamp:
05/07/08 01:15:08 (5 months ago)
Author:
markdoliner
Message:

Fix a potential memory leak when the remote host closes a TCP
connection. This may not actually be a problem in practice. If it
was it seems like we would have noticed it in valgrind before now
and fixed it already.

I'm also adding a note about my change from revision 619 to the
ChangeLog?, and changing the documentation in mio.h a little to hopefully
make it more clear.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/sx/io.c

    r531 r620  
    205205 
    206206    /* EOF if we got a 0-byte read from the socket */ 
    207     if(read == 0) 
     207    if(read == 0) { 
    208208        /* they went away */ 
     209        _sx_buffer_free(in); 
    209210        _sx_state(s, state_CLOSING); 
    210211     
    211     else { 
     212    } else { 
    212213        _sx_debug(ZONE, "passed %d read bytes", in->len); 
    213214