[PATCH 0/2] Forbid 'g_new' (the one without clearing memory)
Posted by
Peter Krempa via Devel
2 weeks, 4 days ago
I got burned by it in WIP patches. Let's not allow it anywhere.
Peter Krempa (2):
Replace all use of 'g_new' with 'g_new0'
syntax-check: Prohibit the non-clearing 'g_new'
build-aux/syntax-check.mk | 2 +-
src/network/network_pf.c | 2 +-
src/qemu/qemu_nbdkit.c | 2 +-
src/qemu/qemu_process.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
--
2.51.0
Re: [PATCH 0/2] Forbid 'g_new' (the one without clearing memory)
Posted by
Pavel Hrdina via Devel
2 weeks, 4 days ago
On Tue, Oct 07, 2025 at 06:30:55PM +0200, Peter Krempa via Devel wrote:
> I got burned by it in WIP patches. Let's not allow it anywhere.
>
> Peter Krempa (2):
> Replace all use of 'g_new' with 'g_new0'
> syntax-check: Prohibit the non-clearing 'g_new'
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>