mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 01:00:41 +01:00
fixed some memory leaks in new code -- thanks to varmojfekoj for the patch
This commit is contained in:
parent
4a50211fc1
commit
c44de2807a
@ -222,13 +222,13 @@ BEGINwillRun
|
||||
CODESTARTwillRun
|
||||
PrintAllowedSenders(1); /* UDP */
|
||||
|
||||
/* if we could not set up any listners, there is no point in running... */
|
||||
if(udpLstnSocks == NULL)
|
||||
ABORT_FINALIZE(RS_RET_NO_RUN);
|
||||
|
||||
if((pRcvBuf = malloc(MAXLINE * sizeof(char))) == NULL) {
|
||||
ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
/* if we could not set up any listners, there is no point in running... */
|
||||
if(udpLstnSocks == NULL)
|
||||
iRet = RS_RET_NO_RUN;
|
||||
finalize_it:
|
||||
ENDwillRun
|
||||
|
||||
@ -242,6 +242,8 @@ CODESTARTafterRun
|
||||
}
|
||||
if(udpLstnSocks != NULL)
|
||||
closeUDPListenSockets(udpLstnSocks);
|
||||
if(pRcvBuf != NULL)
|
||||
free(pRcvBuf);
|
||||
ENDafterRun
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user