]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: alloc: Add automatic cleanup/disposal of strings
authorPeter Krempa <pkrempa@redhat.com>
Mon, 1 Apr 2019 13:04:53 +0000 (15:04 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 3 Apr 2019 09:58:10 +0000 (11:58 +0200)
commita9b3afabcdf18beeb6250b8677bcf1b1d1adad87
treeb62ed08e4f058e1087144458b713e57d6b3b518a
parentc358adc57113be165f6aeedd653c4898898c425f
util: alloc: Add automatic cleanup/disposal of strings

VIR_AUTODISPOSE_STR is similar to VIR_AUTOFREE(char *) but uses
virDispose for clearing of the stored string.

This patch also refactors VIR_DISPOSE to use the new helper which is
used for the new macro.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libvirt_private.syms
src/util/viralloc.c
src/util/viralloc.h