free data on failure, cid#86
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24140 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -81,12 +81,14 @@ make_etypelist(krb5_context context,
|
|||||||
|
|
||||||
ALLOC(*auth_data, 1);
|
ALLOC(*auth_data, 1);
|
||||||
if (*auth_data == NULL) {
|
if (*auth_data == NULL) {
|
||||||
|
free(buf);
|
||||||
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
ALLOC_SEQ(*auth_data, 1);
|
ALLOC_SEQ(*auth_data, 1);
|
||||||
if ((*auth_data)->val == NULL) {
|
if ((*auth_data)->val == NULL) {
|
||||||
|
free(*auth_data);
|
||||||
free(buf);
|
free(buf);
|
||||||
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
|
Reference in New Issue
Block a user