mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
cuse(3): Make cuse_vmfree() NULL safe.
MFC after: 1 week Sponsored by: NVIDIA Networking
This commit is contained in:
parent
0996dd7df6
commit
2ca43c3dba
2 changed files with 2 additions and 1 deletions
|
|
@ -136,6 +136,7 @@ Else this function returns zero.
|
|||
.Fn "cuse_vmfree" "void *"
|
||||
This function frees memory allocated by
|
||||
.Fn cuse_vmalloc .
|
||||
This function is NULL safe.
|
||||
Note that the
|
||||
cuse library will internally not free the memory until the
|
||||
.Fn cuse_uninit
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ cuse_vmfree(void *ptr)
|
|||
int error;
|
||||
int n;
|
||||
|
||||
if (f_cuse < 0)
|
||||
if (f_cuse < 0 || ptr == NULL)
|
||||
return;
|
||||
|
||||
CUSE_LOCK();
|
||||
|
|
|
|||
Loading…
Reference in a new issue