mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 00:00:09 +00:00
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
This commit is contained in:
@@ -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)
|
bucket_file_destroy_cb destroy_cb, struct ast_module *module)
|
||||||
{
|
{
|
||||||
SCOPED_AO2WRLOCK(lock, schemes);
|
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 ||
|
if (ast_strlen_zero(name) || !bucket || !file ||
|
||||||
!bucket->create || !bucket->delete || !bucket->retrieve_id ||
|
!bucket->create || !bucket->delete || !bucket->retrieve_id ||
|
||||||
|
|||||||
Reference in New Issue
Block a user