]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: alloc: Introduce freeing helpers that clear the memory before freeing
authorPeter Krempa <pkrempa@redhat.com>
Fri, 13 May 2016 12:59:01 +0000 (14:59 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 16 May 2016 10:58:48 +0000 (12:58 +0200)
commiteb2116fd9ad6ffb7b7727da0d3ee4cabe0c0a0cf
tree5eec0639df61acf159f6c94d0ae4e288f7549e0b
parentced1e846a03bf56fb45bb3ef67da97f6ba1fc5c5
util: alloc: Introduce freeing helpers that clear the memory before freeing

For a few cases where we handle secret information it's good to clear
the buffers containing sensitive data before freeing them.

Introduce VIR_DISPOSE, VIR_DISPOSE_N and VIR_DISPOSE_STRING that allow
simple clearing fo the buffers holding sensitive information on cleanup
paths.
src/libvirt_private.syms
src/util/viralloc.c
src/util/viralloc.h
tests/viralloctest.c