diff options
-rw-r--r-- | runtime/ratelimit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/ratelimit.c b/runtime/ratelimit.c index ccfcfdd2..4b618fb5 100644 --- a/runtime/ratelimit.c +++ b/runtime/ratelimit.c @@ -203,8 +203,10 @@ ratelimitMsg(ratelimit_t *ratelimit, msg_t *pMsg, msg_t **ppRepMsg) *ppRepMsg = NULL; if(ratelimit->interval) { - if(withinRatelimit(ratelimit, pMsg->ttGenTime) == 0) + if(withinRatelimit(ratelimit, pMsg->ttGenTime) == 0) { + msgDestruct(&pMsg); ABORT_FINALIZE(RS_RET_DISCARDMSG); + } } if(ratelimit->bReduceRepeatMsgs) { CHKiRet(doLastMessageRepeatedNTimes(ratelimit, pMsg, ppRepMsg)); |