snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 862560947b66769f8536651ff63facfb1283ada7
parent 5dc26534b6abeeefc40433a1a827004050c49a01
Author: default <nobody@localhost>
Date:   Tue,  1 Nov 2022 19:28:41 +0100

Added missing user_free() when auth is needed.

Diffstat:
Mhtml.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 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");