mit-kdb: Use calloc so both authdata elements are zeroed
authorGünther Deschner <gd@samba.org>
Fri, 16 May 2014 12:37:39 +0000 (14:37 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 17 Mar 2016 03:32:28 +0000 (04:32 +0100)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/mit-kdb/kdb_samba_policies.c

index 2e9f9ef0c5a9af0792ca4b1c751e060233d399cf..7f9ab070617afed2e2c1eb7f78fb044f014724df 100644 (file)
@@ -363,7 +363,7 @@ krb5_error_code kdb_samba_db_sign_auth_data(krb5_context context,
                goto done;
        }
 
-       authdata = malloc(2 * sizeof(krb5_authdata *));
+       authdata = calloc(2, sizeof(krb5_authdata *));
        if (authdata == NULL) {
                goto done;
        }