From 63107b19ce160262681117edec80a1d7eb6c8e50 Mon Sep 17 00:00:00 2001 From: Jonathan Dye Date: Tue, 10 May 2016 15:48:23 -0600 Subject: [PATCH] realpath memory leak --- net_io.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net_io.c b/net_io.c index a979883f5..c4d53f682 100644 --- a/net_io.c +++ b/net_io.c @@ -781,6 +781,12 @@ int handleHTTPRequest(struct client *c, char *p) { errno = ENOENT; } + if (rp) + free(rp); + + if (hrp) + free(hrp); + if (clen < 0) { content = realloc(content, 128); clen = snprintf(content, 128,"Error opening HTML file: %s", strerror(errno));