From: Wilfried Goesgens Date: Fri, 22 Feb 2013 11:40:22 +0000 (+0100) Subject: POP3Aggregator: check whether we already have a session or not before attempting... X-Git-Tag: v8.20~93 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=7389885c5aa497ec0f3332a5a04f305a4e56ed06 POP3Aggregator: check whether we already have a session or not before attempting to flag it to be killed. --- diff --git a/citadel/modules/pop3client/serv_pop3client.c b/citadel/modules/pop3client/serv_pop3client.c index 25c835c75..ec744849f 100644 --- a/citadel/modules/pop3client/serv_pop3client.c +++ b/citadel/modules/pop3client/serv_pop3client.c @@ -199,8 +199,10 @@ void DeletePOP3Aggregator(void *vptr) FreeStrBuf(&ptr->IO.SendBuf.Buf); FreeStrBuf(&ptr->IO.RecvBuf.Buf); DeleteAsyncMsg(&ptr->IO.ReadMsg); - ((struct CitContext*)ptr->IO.CitContext)->state = CON_IDLE; - ((struct CitContext*)ptr->IO.CitContext)->kill_me = 1; + if (((struct CitContext*)ptr->IO.CitContext)) { + ((struct CitContext*)ptr->IO.CitContext)->state = CON_IDLE; + ((struct CitContext*)ptr->IO.CitContext)->kill_me = 1; + } FreeAsyncIOContents(&ptr->IO); free(ptr); }