[Freeswitch-branches] [commit] r5251 - freeswitch/branches/anthonyl/log2file-branch/src
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;
participants (1)
-
Freeswitch SVN