diff options
author | Kinsey Moore <kmoore@digium.com> | 2013-03-07 00:05:16 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2013-03-07 00:05:16 +0000 |
commit | 0366f7ca77522dd0cad0acd227d8bd7cdab21a90 (patch) | |
tree | 76d3ac6de7f7cd9cddfdc76d253d7665f8d81757 /main/threadpool.c | |
parent | d182115fcb7d267312e6cb630a33ab5ff6ec2344 (diff) |
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
Diffstat (limited to 'main/threadpool.c')
-rw-r--r-- | main/threadpool.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/main/threadpool.c b/main/threadpool.c index 1bf6003ab..f6755e3fb 100644 --- a/main/threadpool.c +++ b/main/threadpool.c @@ -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; } |