summaryrefslogtreecommitdiffstats
path: root/crypto/tlscredspsk.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/tlscredspsk.c')
-rw-r--r--crypto/tlscredspsk.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/tlscredspsk.c b/crypto/tlscredspsk.c
index e26807b899..f5a31108d1 100644
--- a/crypto/tlscredspsk.c
+++ b/crypto/tlscredspsk.c
@@ -192,10 +192,9 @@ qcrypto_tls_creds_psk_prop_set_loaded(Object *obj,
{
QCryptoTLSCredsPSK *creds = QCRYPTO_TLS_CREDS_PSK(obj);
+ qcrypto_tls_creds_psk_unload(creds);
if (value) {
qcrypto_tls_creds_psk_load(creds, errp);
- } else {
- qcrypto_tls_creds_psk_unload(creds);
}
}