snac2

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

commit 50faf7a39928768a537c41a5dd34da600335fff3
parent c8416e1b83bab8cef2b5f8073a4faf11d02945bd
Author: default <nobody@localhost>
Date:   Mon, 17 Oct 2022 20:25:42 +0200

Added some forgotten fclose() calls.

Diffstat:
Mdata.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/data.c b/data.c @@ -36,6 +36,7 @@ int srv_open(char *basedir) /* read full config file */ cfg_data = xs_readall(f); + fclose(f); /* parse */ srv_config = xs_json_loads(cfg_data); @@ -823,6 +824,8 @@ int static_get(snac *snac, const char *id, d_char **data, int *size) if ((f = fopen(fn, "rb")) != NULL) { *data = xs_read(f, size); + fclose(f); + status = 200; }