We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c27456 commit acff4f0Copy full SHA for acff4f0
src/cmt_encode_opentelemetry.c
@@ -711,13 +711,13 @@ static inline Opentelemetry__Proto__Common__V1__AnyValue *cfl_variant_binary_to_
711
result->bytes_value.len = cfl_sds_len(value->data.as_bytes);
712
result->bytes_value.data = calloc(result->bytes_value.len, sizeof(char));
713
714
- if (result->bytes_value.data == NULL) {
+ if (result->bytes_value.data) {
715
+ memcpy(result->bytes_value.data, value->data.as_bytes, result->bytes_value.len);
716
+ }
717
+ else {
718
otlp_any_value_destroy(result);
-
719
result = NULL;
720
}
- memcpy(result->bytes_value.data, value->data.as_bytes, result->bytes_value.len);
721
722
723
return result;
0 commit comments