kdc-db-glue: Do not allocate memory for the principal
authorAndreas Schneider <asn@samba.org>
Wed, 25 Feb 2015 10:56:34 +0000 (11:56 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 20 Mar 2015 22:25:54 +0000 (23:25 +0100)
The function we are calling already allocate memory.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/kdc/db-glue.c

index 7e955e746371f882d31752b44c4262acacdab5c0..0d2871f6a5bfcb18f77eee5f3d72dc99ce8b841b 100644 (file)
@@ -646,7 +646,6 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
         * fixed UPPER case realm, but the as-sent username
         */
 
-       entry_ex->entry.principal = malloc(sizeof(*(entry_ex->entry.principal)));
        if (ent_type == SAMBA_KDC_ENT_TYPE_KRBTGT) {
                if (flags & (HDB_F_CANON)) {
                        /*