aboutsummaryrefslogtreecommitdiff
path: root/azalea-inventory/src/components
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-01-12 09:38:47 -1030
committermat <git@matdoes.dev>2026-01-13 01:08:53 +0500
commitefb36d5fc0fe56a98f5795c53dfa109887cd5aae (patch)
tree3674f0b53afca4b3f1d58fc0406bcbac552ab961 /azalea-inventory/src/components
parent2310666975d0f7e06f44efa6032c6838f2a33f0c (diff)
downloadazalea-drasl-efb36d5fc0fe56a98f5795c53dfa109887cd5aae.tar.xz
fix memory leaks in azalea-protocol
Diffstat (limited to 'azalea-inventory/src/components')
-rw-r--r--azalea-inventory/src/components/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/azalea-inventory/src/components/mod.rs b/azalea-inventory/src/components/mod.rs
index bc2a8f20..5e055592 100644
--- a/azalea-inventory/src/components/mod.rs
+++ b/azalea-inventory/src/components/mod.rs
@@ -128,7 +128,8 @@ macro_rules! define_data_components {
Ok(match kind {
$( DataComponentKind::$x => {
- Self { $x: ManuallyDrop::new($x::azalea_read(buf)?) }
+ let v = $x::azalea_read(buf)?;
+ Self { $x: ManuallyDrop::new(v) }
}, )*
})
}