diff --git a/plugins/out_opentelemetry/opentelemetry_utils.c b/plugins/out_opentelemetry/opentelemetry_utils.c index 981278ef471..25f6baa49e6 100644 --- a/plugins/out_opentelemetry/opentelemetry_utils.c +++ b/plugins/out_opentelemetry/opentelemetry_utils.c @@ -334,7 +334,7 @@ Opentelemetry__Proto__Common__V1__AnyValue *msgpack_bin_to_otlp_any_value(struct result->bytes_value.len = o->via.bin.size; result->bytes_value.data = flb_malloc(o->via.bin.size); - if (result->bytes_value.data) { + if (result->bytes_value.data != NULL) { memcpy(result->bytes_value.data, o->via.bin.ptr, o->via.bin.size); } else {