diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-05-25 14:16:31 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-05-25 14:16:31 +0200 |
commit | b9549380270fa68e27e8ee3f049c7d34156a85ff (patch) | |
tree | e19337d9e942ee0bc62fb08a60e0470b4868a344 /runtime/modules.c | |
parent | 7a7ec37f99f3dd5120952e6ca6263dd72061abb1 (diff) | |
download | rsyslog-b9549380270fa68e27e8ee3f049c7d34156a85ff.tar.gz rsyslog-b9549380270fa68e27e8ee3f049c7d34156a85ff.tar.xz rsyslog-b9549380270fa68e27e8ee3f049c7d34156a85ff.zip |
solved some issues with testbench & a race condition
Diffstat (limited to 'runtime/modules.c')
-rw-r--r-- | runtime/modules.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/modules.c b/runtime/modules.c index 3e8662a3..32ae659f 100644 --- a/runtime/modules.c +++ b/runtime/modules.c @@ -806,7 +806,15 @@ BEGINObjClassExit(module, OBJ_IS_LOADABLE_MODULE) /* CHANGE class also in END MA CODESTARTObjClassExit(module) /* release objects we no longer need */ objRelease(errmsg, CORE_COMPONENT); - pthread_mutex_destroy(&mutLoadUnload); + /* We have a problem in our reference counting, which leads to this function + * being called too early. This usually is no problem, but if we destroy + * the mutex object, we get into trouble. So rather than finding the root cause, + * we do not release the mutex right now and have a very, very slight leak. + * We know that otherwise no bad effects happen, so this acceptable for the + * time being. -- rgerhards, 2009-05-25 + * + * TODO: add again: pthread_mutex_destroy(&mutLoadUnload); + */ # ifdef DEBUG modUsrPrintAll(); /* debug aid - TODO: integrate with debug.c, at least the settings! */ |