krb5: Fix NULL deref on ENOMEM in fkt_add_entry(2)
This commit is contained in:
@@ -582,6 +582,10 @@ fkt_add_entry(krb5_context context,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
sp = krb5_storage_stdio_from_fd(fd, "wb+");
|
sp = krb5_storage_stdio_from_fd(fd, "wb+");
|
||||||
|
if (sp == NULL) {
|
||||||
|
(void) close(fd);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
krb5_storage_set_eof_code(sp, KRB5_KT_END);
|
krb5_storage_set_eof_code(sp, KRB5_KT_END);
|
||||||
ret = krb5_ret_int8(sp, &pvno);
|
ret = krb5_ret_int8(sp, &pvno);
|
||||||
if(ret) {
|
if(ret) {
|
||||||
|
Reference in New Issue
Block a user