Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
protover: Fix memleak in Rust implementation.
* FIXES #25127: https://bugs.torproject.org/25127.
- Loading branch information
Showing
with
55 additions
and 28 deletions.
- +7 −0 changes/bug25127
- +18 −11 src/rust/protover/ffi.rs
- +30 −17 src/rust/protover/protover.rs
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| @@ -0,0 +1,7 @@ | ||
| o Minor bugfixes (Rust FFI): | ||
| - Fix a minor memory leak which would happen whenever the C code would call | ||
| the Rust implementation of protover_get_supported_protocols(). This was | ||
| due to the C version returning a static string, whereas the Rust version | ||
| newly allocated a CString to pass accross the FFI boundary. Consequently, | ||
| the C code was not expecting to need to free() what it was given. Fixes | ||
| bug 25127; bugfix on 0.3.2.1-alpha. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters