]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
HEIMDAL:kdc: fix memory leak when decryption AuthorizationData
authorStefan Metzmacher <metze@samba.org>
Wed, 20 Sep 2017 21:05:09 +0000 (23:05 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 20 Feb 2018 11:52:17 +0000 (12:52 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13131

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source4/heimdal/kdc/krb5tgs.c

index a888788bb6fd60e66bf45be033bcb9f1aa5fef84..6bc4b6ff59ca9a54b8440a18af371ec056c0bcba 100644 (file)
@@ -1388,11 +1388,13 @@ tgs_parse_request(krb5_context context,
        }
        ALLOC(*auth_data);
        if (*auth_data == NULL) {
+           krb5_data_free(&ad);
            krb5_auth_con_free(context, ac);
            ret = KRB5KRB_AP_ERR_BAD_INTEGRITY; /* ? */
            goto out;
        }
        ret = decode_AuthorizationData(ad.data, ad.length, *auth_data, NULL);
+       krb5_data_free(&ad);
        if(ret){
            krb5_auth_con_free(context, ac);
            free(*auth_data);