Skip to content

Commit

Permalink
Merge branch 'master' into X25519-alias-1
Browse files Browse the repository at this point in the history
  • Loading branch information
prbprbprb authored Aug 15, 2023
2 parents 4e7a406 + d0f60fe commit 36917f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ if (androidSdkInstalled) {
cmake {
arguments '-DANDROID=True',
'-DANDROID_STL=c++_static',
"-DBORINGSSL_HOME=$boringsslHome"
"-DBORINGSSL_HOME=$boringsslHome",
"-DCMAKE_CXX_STANDARD=17"
cFlags '-fvisibility=hidden',
'-DBORINGSSL_SHARED_LIBRARY',
'-DBORINGSSL_IMPLEMENTATION',
Expand Down
8 changes: 7 additions & 1 deletion common/src/main/java/org/conscrypt/ConscryptEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,13 @@ private void closeAndFreeResources() {
@SuppressWarnings("deprecation")
protected void finalize() throws Throwable {
try {
closeAndFreeResources();
// If ssl is null, object must not be fully constructed so nothing for us to do here.
if (ssl != null) {
// Otherwise closeAndFreeResources() and callees expect to synchronize on ssl.
synchronized (ssl) {
closeAndFreeResources();
}
}
} finally {
super.finalize();
}
Expand Down

0 comments on commit 36917f3

Please sign in to comment.