[Freeswitch-branches] [commit] r5251 - freeswitch/branches/anthonyl/log2file-branch/src
Freeswitch SVN
anthonyl at freeswitch.org
Sat Jun 2 21:18:13 EDT 2007
Author: anthonyl
Date: Sat Jun 2 21:18:12 2007
New Revision: 5251
Modified:
freeswitch/branches/anthonyl/log2file-branch/src/switch_xml.c
Log:
prevent a segfault if the xml pointer is not valid.
Modified: freeswitch/branches/anthonyl/log2file-branch/src/switch_xml.c
==============================================================================
--- freeswitch/branches/anthonyl/log2file-branch/src/switch_xml.c (original)
+++ freeswitch/branches/anthonyl/log2file-branch/src/switch_xml.c Sat Jun 2 21:18:12 2007
@@ -213,7 +213,9 @@
int i = 0, j = 1;
switch_xml_root_t root = (switch_xml_root_t) xml;
- if (!xml || !xml->attr)
+ if (!xml)
+ return NULL;
+ if (!xml->attr)
return NULL;
while (xml->attr[i] && strcmp(attr, xml->attr[i]))
i += 2;
More information about the Freeswitch-branches
mailing list