The contents of both 'secret' and 'base64secret' are part of different buffers wich are not erased securely. Don't bother with virSecureErase*. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/libxl/libxl_conf.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index d13e48abb2..54e50a24cf 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -45,7 +45,6 @@ #include "xen_xl.h" #include "virnetdevvportprofile.h" #include "virenum.h" -#include "virsecureerase.h" #define VIR_FROM_THIS VIR_FROM_LIBXL @@ -1047,11 +1046,9 @@ libxlMakeNetworkDiskSrc(virStorageSource *src, char **srcstr) /* RBD expects an encoded secret */ base64secret = g_base64_encode(secret, secretlen); - virSecureErase(secret, secretlen); } *srcstr = libxlMakeNetworkDiskSrcStr(src, username, base64secret); - virSecureEraseString(base64secret); if (!*srcstr) goto cleanup; -- 2.38.1