summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/reverse_proxy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/reverse_proxy.c b/src/reverse_proxy.c
index 3f0a839..3ab1031 100644
--- a/src/reverse_proxy.c
+++ b/src/reverse_proxy.c
@@ -186,10 +186,10 @@ static int _reverse_proxy_handle_proxy_cmd(reverse_proxy_client_t client)
186 186
187 /* else wait for messages and forward them */ 187 /* else wait for messages and forward them */
188 int sockfd = socket_connect(host, port); 188 int sockfd = socket_connect(host, port);
189 free(host);
190 if (sockfd < 0) { 189 if (sockfd < 0) {
191 free(buf); 190 free(buf);
192 _reverse_proxy_log(client, "ERROR: Connection to %s:%u failed: %s", host, port, strerror(errno)); 191 _reverse_proxy_log(client, "ERROR: Connection to %s:%u failed: %s", host, port, strerror(errno));
192 free(host);
193 return -1; 193 return -1;
194 } 194 }
195 195
@@ -259,6 +259,7 @@ static int _reverse_proxy_handle_proxy_cmd(reverse_proxy_client_t client)
259 } 259 }
260 } 260 }
261 socket_close(sockfd); 261 socket_close(sockfd);
262 free(host);
262 free(buf); 263 free(buf);
263 264
264 _reverse_proxy_status(client, RP_STATUS_DISCONNECTED, "Disconnected (out: %u / in: %u)", sent_total, recv_total); 265 _reverse_proxy_status(client, RP_STATUS_DISCONNECTED, "Disconnected (out: %u / in: %u)", sent_total, recv_total);