diff --git a/include/zenoh/api/ext/serialization.hxx b/include/zenoh/api/ext/serialization.hxx index b235462..7ac81b6 100644 --- a/include/zenoh/api/ext/serialization.hxx +++ b/include/zenoh/api/ext/serialization.hxx @@ -278,6 +278,7 @@ inline bool __zenoh_deserialize_with_deserializer(zenoh::ext::Deserializer& dese __ZENOH_RESULT_CHECK(::ze_deserializer_deserialize_string(interop::as_copyable_c_ptr(deserializer), &s), err, "Deserialization failure"); value = std::string(::z_string_data(::z_loan(s)), ::z_string_len(::z_loan(s))); + ::z_drop(::z_move(s)); return err == nullptr || *err == Z_OK; }