mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
storageBackendCreateQemuImgSecretPath: Use virSecureErase instead of VIR_DISPOSE_N
Clear out the value using virSecureErase and free it with g_free so that VIR_DISPOSE_N can be phased out. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
91858434b4
commit
8bac46997f
@ -74,6 +74,7 @@
|
|||||||
#include "virxml.h"
|
#include "virxml.h"
|
||||||
#include "virfdstream.h"
|
#include "virfdstream.h"
|
||||||
#include "virutil.h"
|
#include "virutil.h"
|
||||||
|
#include "virsecureerase.h"
|
||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_STORAGE
|
#define VIR_FROM_THIS VIR_FROM_STORAGE
|
||||||
|
|
||||||
@ -1314,7 +1315,8 @@ storageBackendCreateQemuImgSecretPath(virStoragePoolObjPtr pool,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(conn);
|
virObjectUnref(conn);
|
||||||
VIR_DISPOSE_N(secret, secretlen);
|
virSecureErase(secret, secretlen);
|
||||||
|
g_free(secret);
|
||||||
|
|
||||||
return secretPath;
|
return secretPath;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user