diff options
Diffstat (limited to 'plugins/imudp/imudp.c')
-rw-r--r-- | plugins/imudp/imudp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index 127ec2fd..0251a51a 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -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 |