[svn-commits] rmudgett: branch rmudgett/parking r330708 - /team/rmudgett/parking/main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 3 09:00:50 CDT 2011


Author: rmudgett
Date: Wed Aug  3 09:00:46 2011
New Revision: 330708

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=330708
Log:
Forgot to destroy the dead_spaces list in test_dialplan_usage_map().

Modified:
    team/rmudgett/parking/main/features.c

Modified: team/rmudgett/parking/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/parking/main/features.c?view=diff&rev=330708&r1=330707&r2=330708
==============================================================================
--- team/rmudgett/parking/main/features.c (original)
+++ team/rmudgett/parking/main/features.c Wed Aug  3 09:00:46 2011
@@ -7099,6 +7099,7 @@
 	struct parking_dp_context *old_ctx;
 	struct parking_dp_context *new_ctx;
 	struct ast_parkinglot *lot;
+	struct parking_dp_spaces *spaces;
 	struct parking_dp_space_map dead_spaces = AST_LIST_HEAD_NOLOCK_INIT_VALUE;
 	int res;
 
@@ -7131,12 +7132,15 @@
 		&new_ctx->spaces, test_add_dead_space);
 	if (check_spaces(test, &dead_spaces, "10-19,21,26,29,38,40-41", "dead_spaces")) {
 		res = -1;
-		goto fail_new_ctx;
+		goto fail_dead_spaces;
 	}
 
 	res = 0;
 
-fail_new_ctx:
+fail_dead_spaces:
+	while ((spaces = AST_LIST_REMOVE_HEAD(&dead_spaces, node))) {
+		ast_free(spaces);
+	}
 	destroy_dialplan_usage_context(new_ctx);
 
 fail_old_ctx:




More information about the svn-commits mailing list