Re: RFR: JDK-8312512: sspi.cpp gss_export_name avoid delete on NULL fullname [v2]

2023-07-24 Thread Daniel Jeliński
On Mon, 24 Jul 2023 11:30:29 GMT, Matthias Baesken wrote: >> sspi.cpp contains the gss_export_name function, where at the end some >> cleanup is done by calling delete. However this should be done more careful, >> because the function get_full_name which is called in gss_export_name might >> r

Re: RFR: JDK-8312512: sspi.cpp gss_export_name avoid delete on NULL fullname [v2]

2023-07-24 Thread Matthias Baesken
On Mon, 24 Jul 2023 11:01:07 GMT, Daniel Jeliński wrote: > `free`, `delete` and `delete[]` are all safe to call on a NULL pointer. > > I noticed that we are checking for NULL in other places in this file; could > you remove these checks? Hi, I found and adjusted a number of places where the po

Re: RFR: JDK-8312512: sspi.cpp gss_export_name avoid delete on NULL fullname [v2]

2023-07-24 Thread Matthias Baesken
> sspi.cpp contains the gss_export_name function, where at the end some cleanup > is done by calling delete. However this should be done more careful, because > the function get_full_name which is called in gss_export_name might return > NULL, so we better avoid calling delete in this case. Mat

Re: RFR: JDK-8312512: sspi.cpp gss_export_name avoid delete on NULL fullname

2023-07-24 Thread Daniel Jeliński
On Mon, 24 Jul 2023 07:50:44 GMT, Matthias Baesken wrote: > sspi.cpp contains the gss_export_name function, where at the end some cleanup > is done by calling delete. However this should be done more careful, because > the function get_full_name which is called in gss_export_name might return

RFR: JDK-8312512: sspi.cpp gss_export_name avoid delete on NULL fullname

2023-07-24 Thread Matthias Baesken
sspi.cpp contains the gss_export_name function, where at the end some cleanup is done by calling delete. However this should be done more careful, because the function get_full_name which is called in gss_export_name might return NULL, so we better avoid calling delete in this case. ---