mit-kdb: Zero the db principal when we allocate it
authorAndreas Schneider <asn@samba.org>
Thu, 26 Jan 2017 15:54:30 +0000 (16:54 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Sat, 29 Apr 2017 21:31:08 +0000 (23:31 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/kdc/mit_samba.c

index f501584..8a2bfe9 100644 (file)
@@ -188,7 +188,7 @@ int mit_samba_get_principal(struct mit_samba_context *ctx,
        int ret;
        int sflags = 0;
 
-       kentry = malloc(sizeof(krb5_db_entry));
+       kentry = calloc(1, sizeof(krb5_db_entry));
        if (kentry == NULL) {
                return ENOMEM;
        }