check return value of alloc functions, from Charles Longeau

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21745 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-07-31 16:11:25 +00:00
parent d3b77d12db
commit 8d40c2994b
22 changed files with 141 additions and 17 deletions

View File

@@ -673,6 +673,8 @@ kadm5_log_replay_modify (kadm5_server_context *context,
ent.entry.keys.len = num;
ent.entry.keys.val = malloc(len * sizeof(*ent.entry.keys.val));
if (ent.entry.keys.val == NULL)
return ENOMEM;
for (i = 0; i < ent.entry.keys.len; ++i) {
ret = copy_Key(&log_ent.entry.keys.val[i],
&ent.entry.keys.val[i]);