Fix memory leak.
authorEmil Mikulic <emikulic@gmail.com>
Tue, 19 May 2015 11:17:42 +0000 (21:17 +1000)
committerEmil Mikulic <emikulic@gmail.com>
Tue, 19 May 2015 11:17:42 +0000 (21:17 +1000)
darkhttpd.c

index 80f7c70..86ec79f 100644 (file)
@@ -1837,6 +1837,7 @@ static void process_get(struct connection *conn) {
         if (!file_exists(target)) {
             free(target);
             if (no_listing) {
+                free(decoded_url);
                 default_reply(conn, 404, "Not Found",
                     "The URL you requested (%s) was not found.", conn->url);
                 return;