[commit] r8482 - freeswitch/trunk/src/mod/applications/mod_dptools
Author: mikej Date: Mon May 19 18:26:59 2008 New Revision: 8482 Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Log: don't deref NULL. Found by Klockwork (www.klocwork.com) Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c ============================================================================== --- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original) +++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Mon May 19 18:26:59 2008 @@ -901,12 +901,14 @@ for (x = 0; x < argc; x++) { char *p, *this = argv[x]; - p = this; - while(*p == ' ') *p++ = '\0'; - this = p; - if (this) { - char *var = this, *val = NULL; + char *var, *val; + p = this; + while(*p == ' ') *p++ = '\0'; + this = p; + + var = this; + val = NULL; if ((val = strchr(var, '='))) { p = val - 1; *val++ = '\0';
participants (1)
-
Freeswitch SVN