mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
crypto: fix getter of a QCryptoSecret's property
This fixes the condition-check done by the "loaded" property getter, such that the property returns true even when the secret is loaded by the 'file' option. Signed-off-by: Tong Ho <tong.ho@xilinx.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
609dd53df5
commit
569644f761
@ -221,6 +221,7 @@ qcrypto_secret_prop_set_loaded(Object *obj,
|
||||
secret->rawlen = inputlen;
|
||||
} else {
|
||||
g_free(secret->rawdata);
|
||||
secret->rawdata = NULL;
|
||||
secret->rawlen = 0;
|
||||
}
|
||||
}
|
||||
@ -231,7 +232,7 @@ qcrypto_secret_prop_get_loaded(Object *obj,
|
||||
Error **errp G_GNUC_UNUSED)
|
||||
{
|
||||
QCryptoSecret *secret = QCRYPTO_SECRET(obj);
|
||||
return secret->data != NULL;
|
||||
return secret->rawdata != NULL;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user