]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Replace improper use of g_malloc(0) with g_new0
authorPeter Krempa <pkrempa@redhat.com>
Fri, 25 Oct 2024 07:41:21 +0000 (09:41 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 1 Nov 2024 14:52:18 +0000 (15:52 +0100)
commitbb4bd9d31fd21b6080d7416dda0f143a57ff866c
tree6278a439efd9f4f174d45d7c10c14b164fc5734e
parent354a3d2be4c37e9f9732dfb154f31700e27b676f
Replace improper use of g_malloc(0) with g_new0

Completely remove use of g_malloc (without zeroing of the allocated
memory) and forbid further use.

Replace use of g_malloc0 in cases where the variable holding the pointer
has proper type.

In all of the above cases we can use g_new0 instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
build-aux/syntax-check.mk
src/util/virpcivpd.c
tools/wireshark/src/packet-libvirt.c