|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.20] xvmalloc: adjust XVFREE() ordering
commit a99d16079d9bd570a7c6487ed491a1edc4960e49
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue May 19 13:38:55 2026 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue May 19 13:38:55 2026 +0200
xvmalloc: adjust XVFREE() ordering
What c4f427ec879e ("xen: Swap order of actions in the FREE*() macros") did
should have been done right away when XVFREE() was introduced.
Fixes: 9102fcd9579f ("mm: introduce xvmalloc() et al and use for grant
table allocations")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
master commit: 96ffccef5a5f598ffbd263971b92132391f1606a
master date: 2026-05-06 15:11:11 +0200
---
xen/include/xen/xvmalloc.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/include/xen/xvmalloc.h b/xen/include/xen/xvmalloc.h
index 7686d49f81..e0b8368273 100644
--- a/xen/include/xen/xvmalloc.h
+++ b/xen/include/xen/xvmalloc.h
@@ -61,8 +61,9 @@ void *_xvrealloc(void *va, size_t size, unsigned int align);
/* Free an allocation, and zero the pointer to it. */
#define XVFREE(p) do { \
- xvfree(p); \
+ void *_ptr_ = (p); \
(p) = NULL; \
+ xvfree(_ptr_); \
} while ( false )
static inline void *_xvmalloc_array(
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |