[asterisk-commits] twilson: branch 1.8 r360712 - in /branches/1.8: addons/ cdr/ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 28 14:06:07 CDT 2012


Author: twilson
Date: Wed Mar 28 14:06:03 2012
New Revision: 360712

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=360712
Log:
Destroy configs when they are no longer used

https://reviewboard.asterisk.org/r/1834/

Modified:
    branches/1.8/addons/cdr_mysql.c
    branches/1.8/addons/chan_ooh323.c
    branches/1.8/cdr/cdr_adaptive_odbc.c
    branches/1.8/channels/chan_gtalk.c
    branches/1.8/channels/chan_jingle.c

Modified: branches/1.8/addons/cdr_mysql.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/addons/cdr_mysql.c?view=diff&rev=360712&r1=360711&r2=360712
==============================================================================
--- branches/1.8/addons/cdr_mysql.c (original)
+++ branches/1.8/addons/cdr_mysql.c Wed Mar 28 14:06:03 2012
@@ -462,6 +462,7 @@
 		if (reload) {
 			AST_RWLIST_UNLOCK(&columns);
 		}
+		ast_config_destroy(cfg);
 		return AST_MODULE_LOAD_SUCCESS;
 	}
 
@@ -502,6 +503,7 @@
 		if (reload) {
 			AST_RWLIST_UNLOCK(&columns);
 		}
+		ast_config_destroy(cfg);
 		return AST_MODULE_LOAD_FAILURE;
 	}
 

Modified: branches/1.8/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/addons/chan_ooh323.c?view=diff&rev=360712&r1=360711&r2=360712
==============================================================================
--- branches/1.8/addons/chan_ooh323.c (original)
+++ branches/1.8/addons/chan_ooh323.c Wed Mar 28 14:06:03 2012
@@ -2648,6 +2648,7 @@
          		pNewAlias = malloc(sizeof(struct ooAliases));
 			if (!pNewAlias) {
 				ast_log(LOG_ERROR, "Failed to allocate memory for h323id alias\n");
+				ast_config_destroy(cfg);
 				return 1;
 			}
 	 		if (gAliasList == NULL) { /* first h323id - set as callerid if callerid is not set */
@@ -2662,6 +2663,7 @@
          		pNewAlias = malloc(sizeof(struct ooAliases));
 			if (!pNewAlias) {
 				ast_log(LOG_ERROR, "Failed to allocate memory for e164 alias\n");
+				ast_config_destroy(cfg);
 				return 1;
 			}
 			pNewAlias->type =  T_H225AliasAddress_dialedDigits;
@@ -2673,6 +2675,7 @@
          		pNewAlias = malloc(sizeof(struct ooAliases));
 			if (!pNewAlias) {
 				ast_log(LOG_ERROR, "Failed to allocate memory for email alias\n");
+				ast_config_destroy(cfg);
 				return 1;
 			}
 			pNewAlias->type =  T_H225AliasAddress_email_ID;

Modified: branches/1.8/cdr/cdr_adaptive_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/cdr/cdr_adaptive_odbc.c?view=diff&rev=360712&r1=360711&r2=360712
==============================================================================
--- branches/1.8/cdr/cdr_adaptive_odbc.c (original)
+++ branches/1.8/cdr/cdr_adaptive_odbc.c Wed Mar 28 14:06:03 2012
@@ -263,6 +263,7 @@
 		else
 			ast_free(tableptr);
 	}
+	ast_config_destroy(cfg);
 	return res;
 }
 

Modified: branches/1.8/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_gtalk.c?view=diff&rev=360712&r1=360711&r2=360712
==============================================================================
--- branches/1.8/channels/chan_gtalk.c (original)
+++ branches/1.8/channels/chan_gtalk.c Wed Mar 28 14:06:03 2012
@@ -2195,6 +2195,7 @@
 		cat = ast_category_browse(cfg, cat);
 	}
 
+	ast_config_destroy(cfg);
 	gtalk_update_externip();
 	gtalk_free_candidates(global_candidates);
 	return 1;

Modified: branches/1.8/channels/chan_jingle.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_jingle.c?view=diff&rev=360712&r1=360711&r2=360712
==============================================================================
--- branches/1.8/channels/chan_jingle.c (original)
+++ branches/1.8/channels/chan_jingle.c Wed Mar 28 14:06:03 2012
@@ -1888,6 +1888,7 @@
 		}
 		cat = ast_category_browse(cfg, cat);
 	}
+	ast_config_destroy(cfg);
 	jingle_free_candidates(global_candidates);
 	return 1;
 }




More information about the asterisk-commits mailing list