summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/parser_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser_json.c b/src/parser_json.c
index 78214f65..6755d39c 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -2461,7 +2461,7 @@ static struct cmd *json_parse_cmd_add_rule(struct json_ctx *ctx, json_t *root,
json_unpack(root, "{s:s}", "comment", &comment);
if (comment)
- rule->comment = strdup(comment);
+ rule->comment = xstrdup(comment);
json_array_foreach(tmp, index, value) {
struct stmt *stmt;