From 70dcbc67382084d924d353f9c741cd8c0e46cb0f Mon Sep 17 00:00:00 2001 From: ame Date: Tue, 12 Aug 2025 22:02:18 -0500 Subject: mem leak oops --- src/net.c | 1 + src/net/util.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/net.c b/src/net.c index 2766781..d68da2c 100644 --- a/src/net.c +++ b/src/net.c @@ -710,6 +710,7 @@ void* handle_client(void *_arg){ rolling_file_parse(L, &files_idx, &body_idx, header + 4, sT, bite - header_eof - 4, file_cont); } + str_free(decoded_path); str_free(aa); if(v != NULL){ lua_newtable(L); diff --git a/src/net/util.c b/src/net/util.c index 92e538b..78e3043 100644 --- a/src/net/util.c +++ b/src/net/util.c @@ -534,6 +534,7 @@ int percent_decode(str* input, str** _output){ //casting a long to a char pointer is a horrible idea long c = strtol(hex->c, NULL, 16); if(c == 0){ + str_free(hex); *_output = output; return 1; } -- cgit v1.2.3