(mkt_remove_entry): realloc can return NULL on success in the case 0
entries are allocated, From Andrew Bartlet git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16352 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -215,7 +215,7 @@ mkt_remove_entry(krb5_context context,
|
||||
return KRB5_KT_NOTFOUND;
|
||||
}
|
||||
e = realloc(d->entries, d->num_entries * sizeof(*d->entries));
|
||||
if(e != NULL)
|
||||
if(e != NULL || d->num_entries == 0)
|
||||
d->entries = e;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user