mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Replace virSecretFree with virObjectUnref
Since virSecretFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API.
This commit is contained in:
4
cfg.mk
4
cfg.mk
@@ -992,7 +992,7 @@ sc_prohibit_system_error_with_vir_err:
|
||||
# functions. There's a corresponding exclude to allow usage within tests,
|
||||
# docs, examples, tools, src/libvirt-*.c, and include/libvirt/libvirt-*.h
|
||||
sc_prohibit_virXXXFree:
|
||||
@prohibit='\bvir(Domain|Network|NodeDevice|StorageVol|StoragePool|Stream)Free\b' \
|
||||
@prohibit='\bvir(Domain|Network|NodeDevice|StorageVol|StoragePool|Stream|Secret)Free\b' \
|
||||
exclude='sc_prohibit_virXXXFree' \
|
||||
halt='avoid using 'virXXXFree', use 'virObjectUnref' instead' \
|
||||
$(_sc_search_regexp)
|
||||
@@ -1186,4 +1186,4 @@ exclude_file_name_regexp--sc_prohibit_devname = \
|
||||
^(tools/virsh.pod|cfg.mk|docs/.*)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_virXXXFree = \
|
||||
^(docs/|tests/|examples/|tools/|cfg.mk|src/test/test_driver.c|src/libvirt_public.syms|include/libvirt/libvirt-(domain|network|nodedev|storage|stream).h|src/libvirt-(domain|qemu|network|nodedev|storage|stream).c$$)
|
||||
^(docs/|tests/|examples/|tools/|cfg.mk|src/test/test_driver.c|src/libvirt_public.syms|include/libvirt/libvirt-(domain|network|nodedev|storage|stream|secret).h|src/libvirt-(domain|qemu|network|nodedev|storage|stream|secret).c$$)
|
||||
|
||||
Reference in New Issue
Block a user