[asterisk-commits] file: branch 1.2 r48584 - /branches/1.2/apps/app_dial.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Dec 19 14:10:27 MST 2006


Author: file
Date: Tue Dec 19 15:10:26 2006
New Revision: 48584

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48584
Log:
Free localuser structure when we fail to dial (issue #8612 reported by rizzo)

Modified:
    branches/1.2/apps/app_dial.c

Modified: branches/1.2/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_dial.c?view=diff&rev=48584&r1=48583&r2=48584
==============================================================================
--- branches/1.2/apps/app_dial.c (original)
+++ branches/1.2/apps/app_dial.c Tue Dec 19 15:10:26 2006
@@ -1058,6 +1058,7 @@
 			cur = rest;
 			if (!cur)
 				chan->hangupcause = cause;
+			free(tmp);
 			continue;
 		}
 		pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst);
@@ -1096,6 +1097,7 @@
 			if (!tmp->chan) {
 				HANDLE_CAUSE(cause, chan);
 				cur = rest;
+				free(tmp);
 				continue;
 			}
 		}
@@ -1163,6 +1165,7 @@
 			ast_hangup(tmp->chan);
 			tmp->chan = NULL;
 			cur = rest;
+			free(tmp);
 			continue;
 		} else {
 			senddialevent(chan, tmp->chan);



More information about the asterisk-commits mailing list