]> git.ipfire.org Git - thirdparty/qemu.git/commit
coverity-model: make g_free a synonym of free
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Jul 2021 15:54:15 +0000 (17:54 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 30 Jul 2021 10:04:01 +0000 (12:04 +0200)
commit243a545bffc7e86c0f5ae97c0f7d32c079ab78a3
tree97834e22e58a4718273002e7dd6599cc2a35d9bd
parentd4b3d152ee005825520dc171e1e650174ae5ebe6
coverity-model: make g_free a synonym of free

Recently, Coverity has started complaining about using g_free() to free
memory areas allocated by GLib functions not included in model.c,
such as g_strfreev.  This unfortunately goes against the GLib
documentation, which suggests that g_malloc() should be matched
with g_free() and plain malloc() with free(); since GLib 2.46 however
g_malloc() is hardcoded to always use the system malloc implementation,
and g_free is just "free" plus a tracepoint.  Therefore, this
should not cause any problem in practice.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/coverity-scan/model.c