From 1fd8524ffd991d949ff77a9fd5e1b088cb942ed1 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 30 Aug 2023 13:08:17 +0200 Subject: src: use internal_location for unspecified location at allocation time Set location to internal_location instead of NULL to ensure this is always set. Signed-off-by: Pablo Neira Ayuso --- src/parser_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parser_json.c') diff --git a/src/parser_json.c b/src/parser_json.c index 4ea5b432..01d42283 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -3175,7 +3175,7 @@ static struct cmd *json_parse_cmd_add_set(struct json_ctx *ctx, json_t *root, break; } - set = set_alloc(NULL); + set = set_alloc(&internal_location); if (json_unpack(root, "{s:o}", "type", &tmp)) { json_error(ctx, "Invalid set type."); -- cgit v1.2.3