mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Added some forgotten fclose() calls.
This commit is contained in:
parent
c8416e1b83
commit
50faf7a399
1 changed files with 3 additions and 0 deletions
3
data.c
3
data.c
|
@ -36,6 +36,7 @@ int srv_open(char *basedir)
|
||||||
|
|
||||||
/* read full config file */
|
/* read full config file */
|
||||||
cfg_data = xs_readall(f);
|
cfg_data = xs_readall(f);
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
/* parse */
|
/* parse */
|
||||||
srv_config = xs_json_loads(cfg_data);
|
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) {
|
if ((f = fopen(fn, "rb")) != NULL) {
|
||||||
*data = xs_read(f, size);
|
*data = xs_read(f, size);
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
status = 200;
|
status = 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue