Added missing user_free() when auth is needed.

This commit is contained in:
default 2022-11-01 19:28:41 +01:00
parent 5dc26534b6
commit 862560947b

4
html.c
View file

@ -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); p_path = xs_list_get(l, 2);
/* all posts must be authenticated */ /* all posts must be authenticated */
if (!login(&snac, req)) if (!login(&snac, req)) {
user_free(&snac);
return 401; return 401;
}
p_vars = xs_dict_get(req, "p_vars"); p_vars = xs_dict_get(req, "p_vars");