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:
parent
c7c6d47a07
commit
43099a85b1
@ -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 ;
|
||||
}
|
||||
|
@ -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 ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user