From: Peter Krempa Date: Tue, 2 Feb 2021 15:21:50 +0000 (+0100) Subject: util: alloc: Remove VIR_AUTODISPOSE_STR X-Git-Tag: v7.1.0-rc1~306 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20250016098874934ab543aa73b58a4045f6f3a1;p=thirdparty%2Flibvirt.git util: alloc: Remove VIR_AUTODISPOSE_STR There are no users any more. The replacement is to use g_auto and virSecureEraseString explicitly. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrangé --- diff --git a/src/util/viralloc.h b/src/util/viralloc.h index 0173107b87..f9387a00f9 100644 --- a/src/util/viralloc.h +++ b/src/util/viralloc.h @@ -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 *