(hdb_ndbm_create): use calloc to allocate memory
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16303 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -333,7 +333,7 @@ krb5_error_code
|
||||
hdb_ndbm_create(krb5_context context, HDB **db,
|
||||
const char *filename)
|
||||
{
|
||||
*db = malloc(sizeof(**db));
|
||||
*db = calloc(1, sizeof(**db));
|
||||
if (*db == NULL) {
|
||||
krb5_set_error_string(context, "malloc: out of memory");
|
||||
return ENOMEM;
|
||||
|
Reference in New Issue
Block a user