Browse Source

fixed POP fd leak (fixed #18)

dvh-chacham15-master
DINH Viet Hoa 10 years ago
parent
commit
e35910de86
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/low-level/pop3/mailpop3.c

+ 3
- 2
src/low-level/pop3/mailpop3.c View File

@ -393,15 +393,16 @@ int mailpop3_quit(mailpop3 * f)
res = MAILPOP3_NO_ERROR;
close:
if (f->pop3_state != POP3_STATE_DISCONNECTED)
if (f->pop3_stream != NULL) {
mailstream_close(f->pop3_stream);
f->pop3_stream = NULL;
}
if (f->pop3_timestamp != NULL) {
free(f->pop3_timestamp);
f->pop3_timestamp = NULL;
}
f->pop3_stream = NULL;
if (f->pop3_msg_tab != NULL) {
mailpop3_msg_info_tab_free(f->pop3_msg_tab);
f->pop3_msg_tab = NULL;


Loading…
Cancel
Save