imczmq: remove unallocated and unused pointer

Fix a SIGSEGV in a call to
371: zcert_destroy(&serverCert) called from rcvData().

- remove serverCert as it is only used uninitialized in a call
to zcert_destroy() - this causes a core dump at rsyslogd exit.
- also initialize authActor at definition.

Signed-off-by: Nachiketa Prachanda <nachiketa.prachanda@att.com>
This commit is contained in:
Nachiketa Prachanda 2017-10-31 13:48:49 -07:00
parent 1a0b3b6584
commit 666d2e1ce9

View File

@ -278,8 +278,7 @@ static rsRetVal rcvData(void){
} }
} }
zactor_t *authActor; zactor_t *authActor = NULL;
zcert_t *serverCert;
if(runModConf->authenticator == 1) { if(runModConf->authenticator == 1) {
authActor = zactor_new(zauth, NULL); authActor = zactor_new(zauth, NULL);
@ -368,7 +367,6 @@ finalize_it:
} }
zlist_destroy(&listenerList); zlist_destroy(&listenerList);
zactor_destroy(&authActor); zactor_destroy(&authActor);
zcert_destroy(&serverCert);
RETiRet; RETiRet;
} }