aboutsummaryrefslogtreecommitdiff
path: root/crypto/tlscredsanon.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/tlscredsanon.c')
-rw-r--r--crypto/tlscredsanon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/tlscredsanon.c b/crypto/tlscredsanon.c
index 30275b6847..bea5f76c55 100644
--- a/crypto/tlscredsanon.c
+++ b/crypto/tlscredsanon.c
@@ -123,10 +123,9 @@ qcrypto_tls_creds_anon_prop_set_loaded(Object *obj,
{
QCryptoTLSCredsAnon *creds = QCRYPTO_TLS_CREDS_ANON(obj);
+ qcrypto_tls_creds_anon_unload(creds);
if (value) {
qcrypto_tls_creds_anon_load(creds, errp);
- } else {
- qcrypto_tls_creds_anon_unload(creds);
}
}