forked from pool/virtualbox
31 lines
972 B
Diff
31 lines
972 B
Diff
|
Index: VirtualBox-7.0.14/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
|
||
|
===================================================================
|
||
|
--- VirtualBox-7.0.14.orig/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
|
||
|
+++ VirtualBox-7.0.14/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
|
||
|
@@ -45,7 +45,7 @@
|
||
|
#include <iprt/assert.h>
|
||
|
#include <iprt/errcore.h>
|
||
|
#include "r0drv/alloc-r0drv.h"
|
||
|
-
|
||
|
+#include <linux/kmemleak.h>
|
||
|
#include "internal/initterm.h"
|
||
|
|
||
|
|
||
|
@@ -78,11 +78,12 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb
|
||
|
&& !(fFlags & RTMEMHDR_FLAG_ANY_CTX) ))
|
||
|
{
|
||
|
fFlags &= ~RTMEMHDR_FLAG_KMALLOC;
|
||
|
- pHdr = vmalloc(cb + sizeof(*pHdr));
|
||
|
- }
|
||
|
+ pHdr = vmalloc(cb + sizeof(*pHdr));
|
||
|
+ }
|
||
|
+ kmemleak_not_leak(pHdr);
|
||
|
}
|
||
|
- else
|
||
|
- pHdr = vmalloc(cb + sizeof(*pHdr));
|
||
|
+ else
|
||
|
+ pHdr = vmalloc(cb + sizeof(*pHdr));
|
||
|
if (RT_LIKELY(pHdr))
|
||
|
{
|
||
|
/*
|