summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-11-01 19:28:41 +0100
committerdefault <nobody@localhost>2022-11-01 19:28:41 +0100
commit862560947b66769f8536651ff63facfb1283ada7 (patch)
tree15e181621280d1eb0a62a3e43dc3865814616946 /html.c
parent5dc26534b6abeeefc40433a1a827004050c49a01 (diff)
Added missing user_free() when auth is needed.
Diffstat (limited to 'html.c')
-rw-r--r--html.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/html.c b/html.c
index 48594d5..46ff63d 100644
--- a/html.c
+++ b/html.c
@@ -936,8 +936,10 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
p_path = xs_list_get(l, 2);
/* all posts must be authenticated */
- if (!login(&snac, req))
+ if (!login(&snac, req)) {
+ user_free(&snac);
return 401;
+ }
p_vars = xs_dict_get(req, "p_vars");