mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
various: cleanup issues found during leak hunt
In this collection of small patches to prevent Valgrind errors are: fixes for reference leaks in config hooks, evaluating a parameter beyond bounds, and accessing a structure after a lock where it could have been already free'd. Review: https://reviewboard.asterisk.org/r/4407/ ........ Merged revisions 431583 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2971,13 +2971,16 @@ struct sync_task_data {
|
||||
static int sync_task(void *data)
|
||||
{
|
||||
struct sync_task_data *std = data;
|
||||
int ret;
|
||||
|
||||
std->fail = std->task(std->task_data);
|
||||
|
||||
ast_mutex_lock(&std->lock);
|
||||
std->complete = 1;
|
||||
ast_cond_signal(&std->cond);
|
||||
ret = std->fail;
|
||||
ast_mutex_unlock(&std->lock);
|
||||
return std->fail;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ast_sip_push_task_synchronous(struct ast_taskprocessor *serializer, int (*sip_task)(void *), void *task_data)
|
||||
|
Reference in New Issue
Block a user