1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-04-11 15:07:07 +00:00

Merge pull request from signalwire/switch_loadable_module

[Core] scan-build: Fix possible dereference of null pointer in switch_loadable_module_sort_codecs()
This commit is contained in:
Andrey Volk 2020-02-16 01:49:39 +04:00 committed by GitHub
commit 4594fb9209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2696,7 +2696,7 @@ static void switch_loadable_module_sort_codecs(const switch_codec_implementation
#endif
}
if (i > 0 && strcasecmp(array[i]->iananame, array[i-1]->iananame) && this_ptime != sorted_ptime) {
if (i > 0 && array[i-1] && strcasecmp(array[i]->iananame, array[i-1]->iananame) && this_ptime != sorted_ptime) {
int j;
int swapped = 0;