free some more memory. check some more return values.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4021 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -81,6 +81,8 @@ krb5_mk_error(krb5_context context,
|
||||
}
|
||||
encode_KRB_ERROR(buf + sizeof(buf) - 1, sizeof(buf), &msg, &reply->length);
|
||||
reply->data = malloc(reply->length);
|
||||
if (reply->data == NULL)
|
||||
return ENOMEM;
|
||||
memcpy(reply->data, buf + sizeof(buf) - reply->length, reply->length);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user