From 48ff5ae0bf344c13314b9abb8dbcb1265e9a25ec Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Sat, 3 Oct 2020 08:10:35 +0000 Subject: [PATCH] Cleanup: Replaced strdup-and-free with util_replace_string --- src/admin.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/admin.c b/src/admin.c index 6ba428e2..049fccdf 100644 --- a/src/admin.c +++ b/src/admin.c @@ -1050,15 +1050,12 @@ static void command_fallback(client_t *client, admin_format_t response) { const char *fallback; - char *old; ICECAST_LOG_DEBUG("Got fallback request"); COMMAND_REQUIRE(client, "fallback", fallback); - old = source->fallback_mount; - source->fallback_mount = strdup(fallback); - free(old); + util_replace_string(&(source->fallback_mount), fallback); html_success(client, "Fallback configured"); }