aboutsummaryrefslogtreecommitdiff
path: root/util/qemu-option.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-01-28 15:54:02 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2015-02-10 09:27:20 +0300
commitc0462f6d75fa481f7660c15a5ca3a60205aa4eca (patch)
tree92844fcc9a15503319fc302340cf7ccfa8889571 /util/qemu-option.c
parent96c044afdf600e9418b3e509e60ef51a841eed20 (diff)
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 <armbru@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'util/qemu-option.c')
-rw-r--r--util/qemu-option.c4
1 files changed, 2 insertions, 2 deletions
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;
}