diff options
author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2014-05-28 16:37:11 +0500 |
---|---|---|
committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2014-05-28 16:37:11 +0500 |
commit | de616ecae133677d9ab6a0dff1570117e288fa5b (patch) | |
tree | 2e45ee73067753dade5d40607f10646882501466 | |
parent | 3134062a769783557930ff7afd4cfa8a577b423a (diff) |
Fix a crash during concurrent sessions TIMEOUT reported by James
Turner (#5).
imsgev_close schedules(event_add) iev and the event struct is free-ed
before the event is dispatched.
Include string.h after recent libressl changes.
-rw-r--r-- | pop3d.c | 1 | ||||
-rw-r--r-- | session.c | 2 |
2 files changed, 1 insertions, 2 deletions
@@ -201,7 +201,6 @@ sig_handler(int sig, short event, void *arg) case SIGHUP: case SIGTERM: imsgev_clear(&iev_pop3e); - imsgev_close(&iev_pop3e); event_loopexit(NULL); break; case SIGCHLD: @@ -22,6 +22,7 @@ #include <limits.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <syslog.h> #include <unistd.h> @@ -147,7 +148,6 @@ session_close(struct session *s, int flush) iobuf_clear(&entry->iobuf); io_clear(&entry->io); imsgev_clear(&entry->iev_maildrop); - imsgev_close(&entry->iev_maildrop); logit(LOG_INFO, "%u: session closed", entry->id); free(entry); } |