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

Commit

Permalink
fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
siscia committed Aug 14, 2019
1 parent bfe285a commit 9b110f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ extern "C" fn reply(
context.as_ptr(),
) as *mut *mut RedisReply
};
let result_wrap: Box<*mut r::RedisReply> =
unsafe { Box::from_raw(result) };
let mut result: Box<r::RedisReply> =
unsafe { Box::from_raw(*result) };
unsafe { Box::from_raw(*result_wrap) };
result.reply(&context)
}

Expand Down

0 comments on commit 9b110f5

Please sign in to comment.