From 7d5e25b4ba249149060b663efeff7416c12589a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 1 Feb 2007 13:18:22 +0000 Subject: [PATCH] Set hdb->hdb_db for ldap. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20110 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hdb/hdb-ldap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hdb/hdb-ldap.c b/lib/hdb/hdb-ldap.c index aa0cad000..60504e21a 100644 --- a/lib/hdb/hdb-ldap.c +++ b/lib/hdb/hdb-ldap.c @@ -1701,14 +1701,14 @@ hdb_ldap_common(krb5_context context, } memset(*db, 0, sizeof(**db)); - h = malloc(sizeof(*h)); + h = calloc(1, sizeof(*h)); if (h == NULL) { krb5_set_error_string(context, "malloc: out of memory"); free(*db); *db = NULL; return ENOMEM; } - memset(h, 0, sizeof(*h)); + (*db)->hdb_db = h; /* XXX */ if (asprintf(&(*db)->hdb_name, "ldap:%s", search_base) == -1) {