]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:crypto: Add missing call to gnutls_hmac_deinit()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 28 Nov 2023 23:29:58 +0000 (12:29 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 30 Nov 2023 00:02:33 +0000 (00:02 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/crypto/gnutls_sp800_108.c

index a67047bf423c3bcaa7bbfd375d1969fee8da5ea4..599a79162db88dc27cd6db9fa151738e0a45a6d0 100644 (file)
@@ -42,6 +42,7 @@ static NTSTATUS samba_gnutls_sp800_108_derive_key_part(
        RSIVAL(buf, 0, i);
        rc = gnutls_hmac(hmac_hnd, buf, sizeof(buf));
        if (rc < 0) {
+               gnutls_hmac_deinit(hmac_hnd, NULL);
                return gnutls_error_to_ntstatus(rc,
                                                NT_STATUS_HMAC_NOT_SUPPORTED);
        }