diff options
| author | 2022-10-17 20:25:42 +0200 | |
|---|---|---|
| committer | 2022-10-17 20:25:42 +0200 | |
| commit | 50faf7a39928768a537c41a5dd34da600335fff3 (patch) | |
| tree | d041963456bf9d34ab26409464db86b3167ad0f8 | |
| parent | Updated documentation. (diff) | |
| download | penes-snac2-50faf7a39928768a537c41a5dd34da600335fff3.tar.gz penes-snac2-50faf7a39928768a537c41a5dd34da600335fff3.tar.xz penes-snac2-50faf7a39928768a537c41a5dd34da600335fff3.zip | |
Added some forgotten fclose() calls.
| -rw-r--r-- | data.c | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -36,6 +36,7 @@ int srv_open(char *basedir) | |||
| 36 | 36 | ||
| 37 | /* read full config file */ | 37 | /* read full config file */ |
| 38 | cfg_data = xs_readall(f); | 38 | cfg_data = xs_readall(f); |
| 39 | fclose(f); | ||
| 39 | 40 | ||
| 40 | /* parse */ | 41 | /* parse */ |
| 41 | srv_config = xs_json_loads(cfg_data); | 42 | srv_config = xs_json_loads(cfg_data); |
| @@ -823,6 +824,8 @@ int static_get(snac *snac, const char *id, d_char **data, int *size) | |||
| 823 | 824 | ||
| 824 | if ((f = fopen(fn, "rb")) != NULL) { | 825 | if ((f = fopen(fn, "rb")) != NULL) { |
| 825 | *data = xs_read(f, size); | 826 | *data = xs_read(f, size); |
| 827 | fclose(f); | ||
| 828 | |||
| 826 | status = 200; | 829 | status = 200; |
| 827 | } | 830 | } |
| 828 | 831 | ||