From: Markus Armbruster Date: Wed, 28 Jan 2015 14:54:02 +0000 (+0100) Subject: qemu-option: Pair g_malloc() with g_free(), not free() X-Git-Tag: v2.3.0-rc0~64^2~22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c0462f6d75fa481f7660c15a5ca3a60205aa4eca;p=users%2Fdwmw2%2Fqemu.git qemu-option: Pair g_malloc() with g_free(), not free() 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 Reviewed-by: Gonglei Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- diff --git a/util/qemu-option.c b/util/qemu-option.c index c779150808..d3ab65d24f 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; }