mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Strfree() should call kfree() not kmem_free()
Using kmem_free() results in deducting X bytes from the memory accounting when --enable-debug is set. Unfortunately, currently the counterpart kmem_asprintf() and friends do not properly account for memory allocated, so we must do the same on free. If we don't then we end up with a negative number of lost bytes reported when the module is unloaded. A better long term fix would be to add the accounting in to the allocation side but that's a project for another day.
This commit is contained in:
parent
099dc9c2d2
commit
41f84a8d56
@ -295,7 +295,7 @@ EXPORT_SYMBOL(strdup);
|
||||
void
|
||||
strfree(char *str)
|
||||
{
|
||||
kmem_free(str, strlen(str) + 1);
|
||||
kfree(str);
|
||||
}
|
||||
EXPORT_SYMBOL(strfree);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user