[asterisk-commits] rmudgett: branch 12 r402944 - /branches/12/main/bucket.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 21 12:00:40 CST 2013


Author: rmudgett
Date: Thu Nov 21 12:00:39 2013
New Revision: 402944

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402944
Log:
bucket: Fix scheme ref leak in __ast_bucket_scheme_register().

Modified:
    branches/12/main/bucket.c

Modified: branches/12/main/bucket.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/bucket.c?view=diff&rev=402944&r1=402943&r2=402944
==============================================================================
--- branches/12/main/bucket.c (original)
+++ branches/12/main/bucket.c Thu Nov 21 12:00:39 2013
@@ -254,7 +254,7 @@
 	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 ||




More information about the asterisk-commits mailing list