diff options
-rw-r--r-- | modules/httpd/httpd.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/httpd/httpd.c b/modules/httpd/httpd.c index 8348a43..769e106 100644 --- a/modules/httpd/httpd.c +++ b/modules/httpd/httpd.c @@ -91,7 +91,7 @@ static void http_req_handler(struct http_conn *conn, const struct http_msg *msg, void *arg) { int err; - char *buf; + char *buf = NULL; struct pl nprm; (void)arg; @@ -120,10 +120,9 @@ static void http_req_handler(struct http_conn *conn, return; - error: - mem_deref(buf); - http_ereply(conn, 404, "Not Found"); - + error: + mem_deref(buf); + http_ereply(conn, 404, "Not Found"); } |