From 97af8f63e31e9c17f74994c053a7dd216707c62b Mon Sep 17 00:00:00 2001 From: Benny Morgan Date: Sun, 30 Jun 2013 21:41:16 +0200 Subject: [PATCH] - Fix - instead of make a fixed malloc(50), just do a char addrstr[50] --- src/http.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/http.c b/src/http.c index ac73ea71..2f527cb3 100644 --- a/src/http.c +++ b/src/http.c @@ -247,12 +247,11 @@ void http_error(http_connection_t *hc, int error) { const char *errtxt = http_rc2str(error); - char *addrstr = (char*)malloc(50); + char addrstr[50]; tcp_get_ip_str((struct sockaddr*)hc->hc_peer, addrstr, 50); tvhlog(LOG_ERR, "HTTP", "%s: %s -- %d", addrstr, hc->hc_url, error); - free(addrstr); htsbuf_queue_flush(&hc->hc_reply);