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