summaryrefslogtreecommitdiffstats
path: root/src/cfg.h
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2020-09-22 15:22:26 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-09-22 15:24:43 +0200
commitbdd8519d038f3d82c65a4b327ab4a394ad3f0266 (patch)
tree439bdea81f60b84c854844690f8143f6cfa72406 /src/cfg.h
parentaf47a082adb12ad3e1897b0782061683df980d41 (diff)
#988 use-after-free in json configuration parser
The cfg structure stores pointers to the string in this json tree. Do not release the json tree, keep it as field in the cfg structure.
Diffstat (limited to 'src/cfg.h')
-rw-r--r--src/cfg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cfg.h b/src/cfg.h
index 5b89db2..6c7d221 100644
--- a/src/cfg.h
+++ b/src/cfg.h
@@ -17,6 +17,7 @@ struct og_server_cfg {
struct {
const char *interface;
} wol;
+ json_t *json;
};
int parse_json_config(const char *filename, struct og_server_cfg *cfg);