- Fix - instead of make a fixed malloc(50), just do a char addrstr[50]
(cherry picked from commit 97af8f63e3
)
This commit is contained in:
parent
1955888d18
commit
2b8c6d67d4
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue