]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
- Fix - instead of make a fixed malloc(50), just do a char addrstr[50]
authorBenny Morgan <benny@zuragon.com>
Sun, 30 Jun 2013 19:41:16 +0000 (21:41 +0200)
committerAdam Sutton <dev@adamsutton.me.uk>
Thu, 11 Jul 2013 19:16:02 +0000 (20:16 +0100)
(cherry picked from commit 97af8f63e31e9c17f74994c053a7dd216707c62b)

src/http.c

index c668a02f42b25c95bb0d1ac76eedfadfbd936075..b3008e659014340e82e2580080124d5beb6525f1 100644 (file)
@@ -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);