From 47419630223900a4f202b7b0bf04c64d38de6c0f Mon Sep 17 00:00:00 2001 From: Jean-Roland Date: Wed, 19 Jun 2024 10:12:21 +0200 Subject: [PATCH] fix: sub memory leak --- src/net/sample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/sample.c b/src/net/sample.c index 7ceca0f2f..9db7355e3 100644 --- a/src/net/sample.c +++ b/src/net/sample.c @@ -88,7 +88,7 @@ _z_sample_t _z_sample_create(const _z_keyexpr_t *key, const _z_slice_t *payload, s.kind = kind; s.timestamp = timestamp; s.qos = qos; - s.attachment = _z_bytes_duplicate(&att); + s.attachment._slice = _z_slice_steal((_z_slice_t *)&att._slice); return s; } #else