[asterisk-commits] rizzo: trunk r48001 - /trunk/main/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Nov 25 02:02:44 MST 2006


Author: rizzo
Date: Sat Nov 25 03:02:42 2006
New Revision: 48001

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48001
Log:
set pointers to NULL after freeing memory to avoid multiple free()

probably 1.4/1.2 issue as well if someone can look into that.


Modified:
    trunk/main/channel.c

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=48001&r1=48000&r2=48001
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Sat Nov 25 03:02:42 2006
@@ -1027,6 +1027,7 @@
 		free(cid->cid_ani);
 	if (cid->cid_rdnis)
 		free(cid->cid_rdnis);
+	cid->cid_dnid = cid->cid_num = cid->cid_name = cid->cid_ani = cid->cid_rdnis = NULL;
 }
 
 /*! \brief Free a channel structure */



More information about the asterisk-commits mailing list