Skip to content
Snippets Groups Projects
Commit 0366f7ca authored by Kinsey Moore's avatar Kinsey Moore
Browse files

Fix ref leak in threadpool.c

If ast_threadpool_set_size with a size equal to the current size, a
reference to a set_size_data structure would be leaked.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent d182115f
No related branches found
No related tags found
No related merge requests found
......@@ -792,7 +792,7 @@ static struct set_size_data *set_size_data_alloc(struct ast_threadpool *pool,
*/
static int queued_set_size(void *data)
{
struct set_size_data *ssd = data;
RAII_VAR(struct set_size_data *, ssd, data, ao2_cleanup);
struct ast_threadpool *pool = ssd->pool;
unsigned int num_threads = ssd->size;
......@@ -813,7 +813,6 @@ static int queued_set_size(void *data)
}
threadpool_send_state_changed(pool);
ao2_ref(ssd, -1);
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment