[libvirt] [PATCH 02/10] util: alloc: Add automatic cleanup/disposal of strings
Ján Tomko
jtomko at redhat.com
Tue Apr 2 13:16:07 UTC 2019
On Mon, Apr 01, 2019 at 03:04:53PM +0200, Peter Krempa wrote:
>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 at redhat.com>
>---
> src/libvirt_private.syms | 1 +
> src/util/viralloc.c | 16 ++++++++++++++++
> src/util/viralloc.h | 14 ++++++++++++--
> 3 files changed, 29 insertions(+), 2 deletions(-)
>
Reviewed-by: Ján Tomko <jtomko at redhat.com>
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190402/f6b54041/attachment-0001.sig>
More information about the libvir-list
mailing list