From 5dc4cbdf82191bc29afc414ac10204bd17275d69 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 19 Oct 2013 16:58:45 +0200 Subject: util/FormatString: new library to replace g_strdup_printf() --- src/output/HttpdClient.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/output') diff --git a/src/output/HttpdClient.cxx b/src/output/HttpdClient.cxx index c622f823a..9595e47f6 100644 --- a/src/output/HttpdClient.cxx +++ b/src/output/HttpdClient.cxx @@ -146,9 +146,7 @@ HttpdClient::SendResponse() httpd->content_type); } else if (metadata_requested) { - gchar *metadata_header; - - metadata_header = + char *metadata_header = icy_server_metadata_header(httpd->name, httpd->genre, httpd->website, httpd->content_type, @@ -156,7 +154,7 @@ HttpdClient::SendResponse() g_strlcpy(buffer, metadata_header, sizeof(buffer)); - g_free(metadata_header); + delete[] metadata_header; } else { /* revert to a normal HTTP request */ snprintf(buffer, sizeof(buffer), -- cgit v1.2.3