rust-vmm / vmm-sys-util

Helpers and utilities used by multiple rust-vmm components and VMMs
BSD 3-Clause "New" or "Revised" License
78 stars 64 forks source link

Fix possible memory leak #208

Closed JonathanWoollett-Light closed 10 months ago

JonathanWoollett-Light commented 10 months ago

Summary of the PR

If an error is returned after calling CString::into_raw and before calling CString::from_raw the memory allocated for the string is leaked. This could previously occur within TempFile::new_with_prefix.

Requirements

Before submitting your PR, please make sure you addressed the following requirements:

JonathanWoollett-Light commented 9 months ago

Fixes https://github.com/rust-vmm/vmm-sys-util/issues/212