[asterisk-commits] mmichelson: branch mmichelson/features_config r390732 - /team/mmichelson/feat...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 6 15:46:31 CDT 2013


Author: mmichelson
Date: Thu Jun  6 15:46:30 2013
New Revision: 390732

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390732
Log:
Destroy string fields in general config.


Modified:
    team/mmichelson/features_config/main/features_config.c

Modified: team/mmichelson/features_config/main/features_config.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/main/features_config.c?view=diff&rev=390732&r1=390731&r2=390732
==============================================================================
--- team/mmichelson/features_config/main/features_config.c (original)
+++ team/mmichelson/features_config/main/features_config.c Thu Jun  6 15:46:30 2013
@@ -369,6 +369,13 @@
 	ao2_cleanup(cfg->pickup);
 }
 
+static void general_destructor(void *obj)
+{
+	struct ast_features_general_config *cfg = obj;
+
+	ast_string_field_free_memory(cfg);
+}
+
 static void xfer_destructor(void *obj)
 {
 	struct ast_features_xfer_config *cfg = obj;
@@ -392,7 +399,7 @@
 		return NULL;
 	}
 
-	cfg->general = ao2_alloc(sizeof(*cfg->general), NULL);
+	cfg->general = ao2_alloc(sizeof(*cfg->general), general_destructor);
 	if (!cfg->general || ast_string_field_init(cfg->general, 32)) {
 		return NULL;
 	}




More information about the asterisk-commits mailing list