diff options
Diffstat (limited to 'crypto/tlscredspsk.c')
-rw-r--r-- | crypto/tlscredspsk.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/tlscredspsk.c b/crypto/tlscredspsk.c index 4b6cf636ce..15d12e2448 100644 --- a/crypto/tlscredspsk.c +++ b/crypto/tlscredspsk.c @@ -69,7 +69,8 @@ static int qcrypto_tls_creds_psk_load(QCryptoTLSCredsPSK *creds, Error **errp) { - char *pskfile = NULL, *dhparams = NULL; + g_autofree char *pskfile = NULL; + g_autofree char *dhparams = NULL; const char *username; int ret; int rv = -1; @@ -139,8 +140,6 @@ qcrypto_tls_creds_psk_load(QCryptoTLSCredsPSK *creds, rv = 0; cleanup: g_free(key.data); - g_free(pskfile); - g_free(dhparams); return rv; } |