[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC 1/2] add bitmap_free() wrapper
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH RFC 1/2] add bitmap_free() wrapper |
Date: |
Wed, 16 Nov 2016 17:02:55 +0100 |
it will be used for freeing bitmaps allocated with bitmap_[try]_new()
Signed-off-by: Igor Mammedov <address@hidden>
---
include/qemu/bitmap.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h
index 63ea2d0..0289836 100644
--- a/include/qemu/bitmap.h
+++ b/include/qemu/bitmap.h
@@ -98,6 +98,11 @@ static inline unsigned long *bitmap_new(long nbits)
return ptr;
}
+static inline void bitmap_free(unsigned long *bitmap)
+{
+ g_free(bitmap);
+}
+
static inline void bitmap_zero(unsigned long *dst, long nbits)
{
if (small_nbits(nbits)) {
--
2.7.4