mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-08 08:51:50 +00:00
don't deref NULL. Found by Klockwork (www.klocwork.com)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8515 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
088b842ced
commit
91fc355a62
@ -327,14 +327,18 @@ static switch_status_t setup_formats(void)
|
|||||||
map->ext = switch_core_permanent_strdup(info.extension);
|
map->ext = switch_core_permanent_strdup(info.extension);
|
||||||
map->uext = switch_core_permanent_strdup(info.extension);
|
map->uext = switch_core_permanent_strdup(info.extension);
|
||||||
map->format = info.format;
|
map->format = info.format;
|
||||||
|
if (map->ext) {
|
||||||
for (p = map->ext; *p; p++) {
|
for (p = map->ext; *p; p++) {
|
||||||
*p = (char) tolower(*p);
|
*p = (char) tolower(*p);
|
||||||
}
|
}
|
||||||
|
switch_core_hash_insert(globals.format_hash, map->ext, map);
|
||||||
|
}
|
||||||
|
if (map->uext) {
|
||||||
for (p = map->uext; *p; p++) {
|
for (p = map->uext; *p; p++) {
|
||||||
*p = (char) toupper(*p);
|
*p = (char) toupper(*p);
|
||||||
}
|
}
|
||||||
switch_core_hash_insert(globals.format_hash, map->ext, map);
|
|
||||||
switch_core_hash_insert(globals.format_hash, map->uext, map);
|
switch_core_hash_insert(globals.format_hash, map->uext, map);
|
||||||
|
}
|
||||||
supported_formats[len++] = (char *) info.extension;
|
supported_formats[len++] = (char *) info.extension;
|
||||||
}
|
}
|
||||||
format = info.format;
|
format = info.format;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user