summaryrefslogtreecommitdiff
path: root/main/bucket.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-11-21 18:11:04 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-11-21 18:11:04 +0000
commitf62373b7a3dd0dd655da7ee1d2df2b4fcac43ceb (patch)
tree28e40b19531a8a721ad821e8cc27b658efb7e4ab /main/bucket.c
parentc3575e338e986e112e092309ae2b585b988aa6d0 (diff)
bucket: Fix scheme ref leak in __ast_bucket_scheme_register().
........ Merged revisions 402944 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/bucket.c')
-rw-r--r--main/bucket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/bucket.c b/main/bucket.c
index 8f6acdaa5..10d230b7b 100644
--- a/main/bucket.c
+++ b/main/bucket.c
@@ -254,7 +254,7 @@ int __ast_bucket_scheme_register(const char *name, struct ast_sorcery_wizard *bu
bucket_file_destroy_cb destroy_cb, struct ast_module *module)
{
SCOPED_AO2WRLOCK(lock, schemes);
- struct ast_bucket_scheme *scheme;
+ RAII_VAR(struct ast_bucket_scheme *, scheme, NULL, ao2_cleanup);
if (ast_strlen_zero(name) || !bucket || !file ||
!bucket->create || !bucket->delete || !bucket->retrieve_id ||