On Tue, 27 Feb 2024 16:36:42 GMT, Mark Powers <mpow...@openjdk.org> wrote:
> Why do you have to set memory to zero? If you really need to, `calloc()` sets > memory to zero. Inside `newGSSCB`, if there is anything wrong before `cb->application_data` is initialized, `deleteGSSCB` will be called and it has if (cb->application_data.length != 0) { resetGSSBuffer(&(cb->application_data)); } Now if `length` is not zero, `resetGSSBuffer` function calls `free` on a buffer. And yes, `calloc` should also work. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18015#issuecomment-1967126345