mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
syntax-check: Prohibit the non-clearing 'g_new'
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user