|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.21] xvmalloc: adjust XVFREE() ordering
commit 9358a206cbf9a2bda0d3539cb5f114c4b78608d6
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue May 19 13:34:58 2026 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue May 19 13:34:58 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 110b10e88c..83c9d4dea2 100644
--- a/xen/include/xen/xvmalloc.h
+++ b/xen/include/xen/xvmalloc.h
@@ -71,8 +71,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.21
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |