Skip to content

Commit

Permalink
cleanup before throw
Browse files Browse the repository at this point in the history
  • Loading branch information
kspeeyu committed Jul 13, 2023
1 parent e6f5290 commit 80aedc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/jdk.internal.le/linux/native/lible/CLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ JNIEXPORT void JNICALL Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibr
int error = ttyname_r(fd, data, len);

if (error != 0) {
throw_errno(env);
delete[] data;
throw_errno(env);
return ;
}

Expand Down
2 changes: 1 addition & 1 deletion src/jdk.internal.le/macosx/native/lible/CLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ JNIEXPORT void JNICALL Java_jdk_internal_org_jline_terminal_impl_jna_osx_CLibrar
int error = ttyname_r(fd, data, len);

if (error != 0) {
throw_errno(env);
delete[] data;
throw_errno(env);
return ;
}

Expand Down

0 comments on commit 80aedc2

Please sign in to comment.