Skip to content

Commit

Permalink
Fix destruction of modules without cfSysLineHdlrs
Browse files Browse the repository at this point in the history
Modules that don't register cfSysLineHdlrs were not completely
destructed, which resulted in a mem leak. Most of the time, this is
not an issue, as the majority of modules is destructed only during
shutdown. In case of modules which can be (un)loaded repeatedly, such
as lmnsd_ptcp, the leaked amount would accumulate over time. Still,
overall, the leak is pretty small.
  • Loading branch information
theinric committed Apr 28, 2015
1 parent 3bec0ba commit d4cf8bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/cfsysline.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,11 @@ rsRetVal unregCfSysLineHdlrs4Owner(void *pOwnerCookie)
* class does not provide a way to just search the lower-level handlers.
*/
iRet = llExecFunc(&llCmdList, unregHdlrsHeadExec, pOwnerCookie);
if(iRet == RS_RET_NOT_FOUND) {
/* It is not considered an error if a module had no
hanlers registered. */
iRet = RS_RET_OK;
}

RETiRet;
}
Expand Down

0 comments on commit d4cf8bf

Please sign in to comment.