]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
gnutls_x509_crt_init: Fix dereference of NULL pointer
authorTim Rühsen <tim.ruehsen@gmx.de>
Tue, 12 Feb 2019 14:20:23 +0000 (15:20 +0100)
committerTim Rühsen <tim.ruehsen@gmx.de>
Fri, 22 Feb 2019 12:11:02 +0000 (13:11 +0100)
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
lib/x509/x509.c

index fa0188ef05d6fc0c72ee0e389e7f791c3d153f7e..995d5cd5cf9600b8393645ed175f0b5e4ca53121 100644 (file)
@@ -227,8 +227,8 @@ int gnutls_x509_crt_init(gnutls_x509_crt_t * cert)
        if (result < 0) {
                gnutls_assert();
                asn1_delete_structure(&tmp->cert);
-               gnutls_free(tmp);
                gnutls_subject_alt_names_deinit(tmp->san);
+               gnutls_free(tmp);
                return result;
        }