[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH 2/4] qemu-option: Pair g_malloc() with g_free(), n
From: |
Markus Armbruster |
Subject: |
[Qemu-trivial] [PATCH 2/4] qemu-option: Pair g_malloc() with g_free(), not free() |
Date: |
Wed, 28 Jan 2015 15:54:02 +0100 |
Spotted by Coverity with preview checker ALLOC_FREE_MISMATCH enabled
and my "coverity: Model g_free() isn't necessarily free()" model patch
applied.
Signed-off-by: Markus Armbruster <address@hidden>
---
util/qemu-option.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/qemu-option.c b/util/qemu-option.c
index c779150..d3ab65d 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -230,7 +230,7 @@ bool has_help_option(const char *param)
}
out:
- free(buf);
+ g_free(buf);
return result;
}
@@ -255,7 +255,7 @@ bool is_valid_option_list(const char *param)
}
out:
- free(buf);
+ g_free(buf);
return result;
}
--
1.9.3
- [Qemu-trivial] [PATCH 0/4] Pair g_malloc() with g_free(), not free(), Markus Armbruster, 2015/01/28
- [Qemu-trivial] [PATCH 2/4] qemu-option: Pair g_malloc() with g_free(), not free(),
Markus Armbruster <=
- [Qemu-trivial] [PATCH 3/4] spapr_vio: Pair g_malloc() with g_free(), not free(), Markus Armbruster, 2015/01/28
- [Qemu-trivial] [PATCH 1/4] qemu-option: Replace pointless use of g_malloc0() by g_malloc(), Markus Armbruster, 2015/01/28
- [Qemu-trivial] [PATCH 4/4] usb: Pair g_malloc() with g_free(), not free(), Markus Armbruster, 2015/01/28
- Re: [Qemu-trivial] [Qemu-devel] [PATCH 0/4] Pair g_malloc() with g_free(), not free(), Eric Blake, 2015/01/28