Skip to content
This repository was archived by the owner on Jul 11, 2021. It is now read-only.

Commit 9b110f5

Browse files
committed
fix memory leak
1 parent bfe285a commit 9b110f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/commands.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ extern "C" fn reply(
3232
context.as_ptr(),
3333
) as *mut *mut RedisReply
3434
};
35+
let result_wrap: Box<*mut r::RedisReply> =
36+
unsafe { Box::from_raw(result) };
3537
let mut result: Box<r::RedisReply> =
36-
unsafe { Box::from_raw(*result) };
38+
unsafe { Box::from_raw(*result_wrap) };
3739
result.reply(&context)
3840
}
3941

0 commit comments

Comments
 (0)