diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2018-12-30 14:25:21 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2018-12-30 14:25:21 -0500 |
commit | c2bd063ac476368b27089e976ab0099b849ec492 (patch) | |
tree | 4b574b980947680d9b3bb016613dc49d8db6909d | |
parent | 8ed98ad089913d37093da1c99b37f15200b4ebea (diff) | |
download | lighttpd-git-c2bd063ac476368b27089e976ab0099b849ec492.tar.gz |
[core] do not free() reused buffer
-rw-r--r-- | src/http-header-glue.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/http-header-glue.c b/src/http-header-glue.c index 6cbc9e03..a9fcdda5 100644 --- a/src/http-header-glue.c +++ b/src/http-header-glue.c @@ -39,18 +39,14 @@ int http_response_redirect_to_directory(server *srv, connection *con) { if (-1 == getsockname(con->fd, (struct sockaddr *)&our_addr, &our_addr_len) || our_addr_len > (socklen_t)sizeof(our_addr)) { con->http_status = 500; - log_error_write(srv, __FILE__, __LINE__, "ss", "can't get sockname", strerror(errno)); - - buffer_free(o); - return 0; + return -1; } /* Lookup name: secondly try to get hostname for bind address */ if (0 != sock_addr_nameinfo_append_buffer(srv, o, &our_addr)) { con->http_status = 500; - buffer_free(o); return -1; } else { unsigned short default_port = 80; |