mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
fix small unlikely but still possible bugs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5598 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
de4764ea4d
commit
e17fed3ada
@ -164,7 +164,7 @@ static switch_status_t do_config(void)
|
||||
|
||||
if (!(bindings_tag = switch_xml_child(cfg, "bindings"))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing <bindings> tag!\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
for (binding_tag = switch_xml_child(bindings_tag, "binding"); binding_tag; binding_tag = binding_tag->next) {
|
||||
@ -195,7 +195,7 @@ static switch_status_t do_config(void)
|
||||
}
|
||||
|
||||
if (!(binding = malloc(sizeof(*binding)))) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
goto done;
|
||||
}
|
||||
memset(binding, 0, sizeof(*binding));
|
||||
|
||||
@ -218,6 +218,7 @@ static switch_status_t do_config(void)
|
||||
binding = NULL;
|
||||
}
|
||||
|
||||
done:
|
||||
switch_xml_free(xml);
|
||||
|
||||
return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user