mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
Cleanup: Replaced strdup-and-free with util_replace_string
This commit is contained in:
parent
1e105ff2e9
commit
48ff5ae0bf
@ -1050,15 +1050,12 @@ static void command_fallback(client_t *client,
|
|||||||
admin_format_t response)
|
admin_format_t response)
|
||||||
{
|
{
|
||||||
const char *fallback;
|
const char *fallback;
|
||||||
char *old;
|
|
||||||
|
|
||||||
ICECAST_LOG_DEBUG("Got fallback request");
|
ICECAST_LOG_DEBUG("Got fallback request");
|
||||||
|
|
||||||
COMMAND_REQUIRE(client, "fallback", fallback);
|
COMMAND_REQUIRE(client, "fallback", fallback);
|
||||||
|
|
||||||
old = source->fallback_mount;
|
util_replace_string(&(source->fallback_mount), fallback);
|
||||||
source->fallback_mount = strdup(fallback);
|
|
||||||
free(old);
|
|
||||||
|
|
||||||
html_success(client, "Fallback configured");
|
html_success(client, "Fallback configured");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user