diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-09 07:37:52 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-09 07:37:52 +0000 |
commit | 4424b26d1e85f5734ee58878fff5eaf075ff1f1f (patch) | |
tree | a1d863ce8753551f36998a0b98a2e728758de90a /res/res_pktccops.c | |
parent | da9964e7b12801627a768f7efaefdcff87d28d4a (diff) |
Fix various problems detected with Valgrind.
* chan_console accessed pvts after deallocation.
* cdr_mysql stored a pointer that was freed by realloc()
* The module loader did not check usecount on shutdown, which led to chan_iax2
reading a timer that was already unloaded.
* The event subsystem sometimes creates an event with no IEs. Due to a corner
condition, the code would read beyond the memory boundary.
* res_pktccops did not correctly check whether its monitor thread was started.
(closes issue #16062)
Reported by: alexanderheinz
Patches:
20091109__issue16062.diff.txt uploaded by tilghman (license 14)
Tested by: tilghman
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@228798 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_pktccops.c')
-rw-r--r-- | res/res_pktccops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pktccops.c b/res/res_pktccops.c index c3f7aa6be..60e5c4efd 100644 --- a/res/res_pktccops.c +++ b/res/res_pktccops.c @@ -1446,7 +1446,7 @@ static int load_module(void) static int unload_module(void) { if (!ast_mutex_lock(&pktccops_lock)) { - if (pktccops_thread && (pktccops_thread != AST_PTHREADT_STOP)) { + if ((pktccops_thread != AST_PTHREADT_NULL) && (pktccops_thread != AST_PTHREADT_STOP)) { pthread_cancel(pktccops_thread); pthread_kill(pktccops_thread, SIGURG); pthread_join(pktccops_thread, NULL); |