From fa870ab358ce94017228cdddf4697e041fc32531 Mon Sep 17 00:00:00 2001 From: default Date: Tue, 25 Oct 2022 09:32:41 +0200 Subject: Backport from xs. --- xs_httpd.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xs_httpd.h') diff --git a/xs_httpd.h b/xs_httpd.h index 2fb5057..09dce0d 100644 --- a/xs_httpd.h +++ b/xs_httpd.h @@ -252,10 +252,8 @@ d_char *xs_httpd_request(FILE *f, d_char **payload, int *p_size) req = xs_dict_append(req, "q_vars", q_vars); req = xs_dict_append(req, "p_vars", p_vars); - if (errno) { - free(req); - req = NULL; - } + if (errno) + req = xs_free(req); return req; } -- cgit v1.2.3