mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 07:22:07 +03: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 "virfdstream.h"
|
||||
#include "virutil.h"
|
||||
#include "virsecureerase.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_STORAGE
|
||||
|
||||
@ -1314,7 +1315,8 @@ storageBackendCreateQemuImgSecretPath(virStoragePoolObjPtr pool,
|
||||
|
||||
cleanup:
|
||||
virObjectUnref(conn);
|
||||
VIR_DISPOSE_N(secret, secretlen);
|
||||
virSecureErase(secret, secretlen);
|
||||
g_free(secret);
|
||||
|
||||
return secretPath;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user