summaryrefslogtreecommitdiff
path: root/src/exporter
diff options
context:
space:
mode:
authorchenzizhan <[email protected]>2023-11-24 14:46:12 +0800
committerchenzizhan <[email protected]>2023-11-24 14:46:12 +0800
commitd0219e918b21fc39ecb567a00b81161bb7387eec (patch)
tree722f5e2278ea88236f4b7adcd9c45e7860c6f1b8 /src/exporter
parent87f568428725f6990ed140b669534dcf9737dc0d (diff)
fix: coredump when delta instance has metric unoperated
Diffstat (limited to 'src/exporter')
-rw-r--r--src/exporter/cjson_exporter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/exporter/cjson_exporter.c b/src/exporter/cjson_exporter.c
index 608b393..e430f5a 100644
--- a/src/exporter/cjson_exporter.c
+++ b/src/exporter/cjson_exporter.c
@@ -958,7 +958,7 @@ char *fieldstat_json_exporter_export_with_delta(const struct fieldstat_json_expo
struct json_writer *field_json_delta = json_writer_init();
if (expair_delta_rearranged[i] != NULL) {
- for (int j = 0; j < expair_acc[i].n_metric; j++) {
+ for (int j = 0; j < expair_delta_rearranged[i]->n_metric; j++) {
kv_pair_write_to_json(expair_delta_rearranged[i]->metric_pairs[j], field_json_delta);
}
}