cuse(3): Make cuse_vmfree() NULL safe.
MFC after: 1 week Sponsored by: NVIDIA Networking
This commit is contained in:
parent
0996dd7df6
commit
2ca43c3dba
@ -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 New Issue
Block a user