Skip to content

Commit

Permalink
fix file-descriptor leakage (#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjstevns committed Feb 16, 2011
1 parent 5dc9df4 commit a7c3d97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/clientsession.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ void client_session_read(void *arg)
event_del(session->ci->rev);
if (session->ci->read_buffer->len < 1)
client_session_bailout(&session);
else
session->handle_input(session);
}
else if (state & CLIENT_OK || state & CLIENT_AGAIN) {
session->handle_input(session);
Expand Down
3 changes: 1 addition & 2 deletions src/pop3.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ static void pop3_close(ClientSession_t *session)
clientbase_t *ci = session->ci;
TRACE(TRACE_DEBUG,"[%p] sessionResult [%d]", session, session->SessionResult);

session->state = CLIENTSTATE_QUIT;
if (session->username != NULL && (session->was_apop || session->password != NULL)) {

switch (session->SessionResult) {
Expand Down Expand Up @@ -214,8 +215,6 @@ static void pop3_close(ClientSession_t *session)
} else {
ci_write(ci, "+OK see ya later\r\n");
}

session->state = CLIENTSTATE_QUIT;
}


Expand Down

0 comments on commit a7c3d97

Please sign in to comment.