Only free ahost if the reverse lookup was performed - geomyidae - A small C-based gopherd.
(HTM) git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
(DIR) LICENSE
---
(DIR) commit f26ccad8ca8d0f79f7195f6871bb2ceac816ccfa
(DIR) parent 03a382fe95dfeb696629733bbb5a9a751df1b3aa
(HTM) Author: Lucas Gabriel Vuotto <lgv@nanashi.co>
Date: Tue, 23 Jan 2018 16:02:23 -0300
Only free ahost if the reverse lookup was performed
Signed-off-by: Lucas Gabriel Vuotto <lgv@nanashi.co>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
M main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/main.c b/main.c
@@ -99,7 +99,8 @@ logentry(char *host, char *port, char *qry, char *status)
dprintf(glfd, "[%s|%s|%s|%s] %s\n",
timstr, ahost, port, status, qry);
- free(ahost);
+ if (revlookup)
+ free(ahost);
}
return;