From 37fcf0e0fe10dc83087c3118646dbef5c43d6fe7 Mon Sep 17 00:00:00 2001
From: Mark Michelson <mmichelson@digium.com>
Date: Tue, 18 Mar 2008 23:32:58 +0000
Subject: [PATCH] Fix a typo which caused a double free in chan_zap. This was
 discovered by Juggie while attempting to load chan_zap. Apparently this would
 happen if an error were encountered while trying to process zapata.conf.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_zap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 01e7843dc4..8cbde4b4a9 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -14105,7 +14105,7 @@ static int setup_zap(int reload)
 		ast_mutex_unlock(&iflock);
 		ast_config_destroy(cfg);
 		if (ucfg) {
-			ast_config_destroy(cfg);
+			ast_config_destroy(ucfg);
 		}
 		return res;
 	}
-- 
GitLab