Unverified Commit 5894cdfd authored by Steven Fackler's avatar Steven Fackler Committed by GitHub
Browse files

Fix get session callback

This could previously open up the possibility of a double-free!

Closes #996
parent a01979cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -406,7 +406,7 @@ where
    match (*callback)(ssl, data) {
        Some(session) => {
            let p = session.as_ptr();
            mem::forget(p);
            mem::forget(session);
            *copy = 0;
            p
        }