aboutsummaryrefslogtreecommitdiff
path: root/crypto/tlscredsx509.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/tlscredsx509.c')
-rw-r--r--crypto/tlscredsx509.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c
index c89dd62435..dbadad4df2 100644
--- a/crypto/tlscredsx509.c
+++ b/crypto/tlscredsx509.c
@@ -694,10 +694,9 @@ qcrypto_tls_creds_x509_prop_set_loaded(Object *obj,
{
QCryptoTLSCredsX509 *creds = QCRYPTO_TLS_CREDS_X509(obj);
+ qcrypto_tls_creds_x509_unload(creds);
if (value) {
qcrypto_tls_creds_x509_load(creds, errp);
- } else {
- qcrypto_tls_creds_x509_unload(creds);
}
}