Page MenuHomeFreeBSD

D56452.diff
No OneTemporary

D56452.diff

diff --git a/sys/compat/linuxkpi/common/src/linux_slab.c b/sys/compat/linuxkpi/common/src/linux_slab.c
--- a/sys/compat/linuxkpi/common/src/linux_slab.c
+++ b/sys/compat/linuxkpi/common/src/linux_slab.c
@@ -250,6 +250,11 @@
if (ptr == NULL)
return (kmalloc(size, flags));
+ if (size == 0) {
+ kfree(ptr);
+ return (ZERO_SIZE_PTR);
+ }
+
osize = ksize(ptr);
if (size <= osize)
return (__DECONST(void *, ptr));

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 23, 3:38 PM (2 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31680619
Default Alt Text
D56452.diff (426 B)

Event Timeline