Merge pull request #444 from signalwire/mod_abstraction

[mod_abstraction] scan-build: Fix dead assignment.
This commit is contained in:
Andrey Volk 2020-02-27 00:09:12 +04:00 committed by GitHub
commit 2d727b7b31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,7 @@ SWITCH_STANDARD_API(api_abstraction_function)
const char *destination = switch_xml_attr_soft(x_api, "destination");
const char *arguments = switch_xml_attr_soft(x_api, "argument");
int proceed = 0;
int proceed;
switch_regex_t *re = NULL;
int ovector[30];
@ -75,7 +75,6 @@ SWITCH_STANDARD_API(api_abstraction_function)
uint32_t len = (uint32_t) (strlen(cmd) + strlen(arguments) + 10) * proceed;
if (!(substituted = malloc(len))) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Memory Error!\n");
proceed = 0;
goto end;
}
memset(substituted, 0, len);