]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
syntax-check: Prohibit the non-clearing 'g_new'
authorPeter Krempa <pkrempa@redhat.com>
Tue, 7 Oct 2025 16:24:19 +0000 (18:24 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 8 Oct 2025 07:24:42 +0000 (09:24 +0200)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
build-aux/syntax-check.mk

index 4ba059b56bd4fa8db5979b75aca98d8c64a7fc4f..4deaa70368ed98ddcc99074b001a24e2f7398e18 100644 (file)
@@ -92,7 +92,7 @@ sc_prohibit_raw_virclassnew:
 
 # Avoid raw malloc and free, except in documentation comments.
 sc_prohibit_raw_allocation:
-       @prohibit='^.[^*].*\<((m|c|re)alloc|free|g_malloc) *\([^)]' \
+       @prohibit='^.[^*].*\<((m|c|re)alloc|free|g_malloc|g_new) *\([^)]' \
        halt='use g_new0/g_malloc0/g_free instead of malloc/free/g_malloc' \
          $(_sc_search_regexp)