We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 923e27a commit 8c061fbCopy full SHA for 8c061fb
1 file changed
plugins/in_process_exporter_metrics/pe_process.c
@@ -993,10 +993,17 @@ static void purge_stale_metrics(struct cmt_map *map,
993
}
994
if (!key) {
995
key = flb_sds_create(label_val);
996
+ if (!key) {
997
+ break;
998
+ }
999
1000
else {
- flb_sds_cat_safe(&key, "|", 1);
- flb_sds_cat_safe(&key, label_val, strlen(label_val));
1001
+ if (flb_sds_cat_safe(&key, "|", 1) == -1 ||
1002
+ flb_sds_cat_safe(&key, label_val, strlen(label_val)) == -1) {
1003
+ flb_sds_destroy(key);
1004
+ key = NULL;
1005
1006
1007
1008
1009
0 commit comments