]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: alloc: Remove VIR_AUTODISPOSE_STR
authorPeter Krempa <pkrempa@redhat.com>
Tue, 2 Feb 2021 15:21:50 +0000 (16:21 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 3 Feb 2021 12:07:14 +0000 (13:07 +0100)
There are no users any more. The replacement is to use g_auto and
virSecureEraseString explicitly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/viralloc.h

index 0173107b87b75da38c055d8fc9c5b3f4a371cb84..f9387a00f9edf7f9657f046a7015009cade2eb4a 100644 (file)
@@ -349,13 +349,3 @@ void virDisposeString(char **strptr)
  * This macro is not safe to be used on arguments with side effects.
  */
 #define VIR_DISPOSE_STRING(ptr) virDisposeString(&(ptr))
-
-/**
- * VIR_AUTODISPOSE_STR:
- *
- * Macro to automatically free and clear the memory allocated to
- * the string variable declared with it by calling virDisposeString
- * when the variable goes out of scope.
- */
-#define VIR_AUTODISPOSE_STR \
-    __attribute__((cleanup(virDisposeString))) char *