mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-18 14:55:58 +00:00
[mod_rayo] Coverity CID 1395579 (Resource leak)
This commit is contained in:
parent
c36ee94b13
commit
c750913edf
@ -4784,19 +4784,23 @@ static void send_console_command(struct rayo_client *client, const char *to, con
|
|||||||
if (!iks_find_attrib(iq, "type")) {
|
if (!iks_find_attrib(iq, "type")) {
|
||||||
iks_insert_attrib(iq, "type", "set");
|
iks_insert_attrib(iq, "type", "set");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iks_find_attrib(iq, "id")) {
|
if (!iks_find_attrib(iq, "id")) {
|
||||||
iks_insert_attrib_printf(iq, "id", "console-%i", RAYO_SEQ_NEXT(client));
|
iks_insert_attrib_printf(iq, "id", "console-%i", RAYO_SEQ_NEXT(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
iks_insert_attrib(iq, "from", RAYO_JID(client));
|
iks_insert_attrib(iq, "from", RAYO_JID(client));
|
||||||
|
|
||||||
/* send command */
|
/* send command */
|
||||||
str = iks_string(iks_stack(iq), iq);
|
str = iks_string(iks_stack(iq), iq);
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\nSEND: to %s, %s\n", to, str);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\nSEND: to %s, %s\n", to, str);
|
||||||
|
iks_free(str);
|
||||||
rayo_client_command_recv(client, iq);
|
rayo_client_command_recv(client, iq);
|
||||||
iks_delete(command);
|
iks_delete(command);
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "bad request xml\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "bad request xml\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
iks_parser_delete(p);
|
iks_parser_delete(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user