8311647: Memory leak in Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibraryImpl_ttyname_1r

Reviewed-by: phh, shade, jlahoda
This commit is contained in:
Jenny Shivayogi 2023-07-13 22:09:21 +00:00 committed by Paul Hohensee
parent c7c6d47a07
commit 43099a85b1
2 changed files with 2 additions and 0 deletions

View File

@ -187,6 +187,7 @@ JNIEXPORT void JNICALL Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibr
int error = ttyname_r(fd, data, len);
if (error != 0) {
delete[] data;
throw_errno(env);
return ;
}

View File

@ -191,6 +191,7 @@ JNIEXPORT void JNICALL Java_jdk_internal_org_jline_terminal_impl_jna_osx_CLibrar
int error = ttyname_r(fd, data, len);
if (error != 0) {
delete[] data;
throw_errno(env);
return ;
}