mirror of
https://git.proxmox.com/git/proxmox-backup-qemu
synced 2025-11-05 15:04:45 +00:00
proxmox_backup_free_error: test if ptr == NULL
This commit is contained in:
parent
ce96ec7bd7
commit
6abb11b405
@ -30,7 +30,9 @@ use restore::*;
|
||||
/// and free the allocated memory.
|
||||
#[no_mangle]
|
||||
pub extern "C" fn proxmox_backup_free_error(ptr: * mut c_char) {
|
||||
unsafe { CString::from_raw(ptr); }
|
||||
if ptr != std::ptr::null_mut() {
|
||||
unsafe { CString::from_raw(ptr); }
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! raise_error_null {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user