Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release leaking certs #47

Merged
merged 2 commits into from
Nov 8, 2021
Merged

Release leaking certs #47

merged 2 commits into from
Nov 8, 2021

Conversation

bmeike
Copy link
Contributor

@bmeike bmeike commented Nov 5, 2021

@pasin found a couple of memory leaks. This is the fix.

@@ -574,6 +574,8 @@ JNICALL Java_com_couchbase_lite_internal_core_impl_NativeC4Listener_startTls(
jboolean enableDeltaSync,
jboolean requirePasswordAuth) {
C4TLSConfig tlsConfig = {};
tlsConfig.rootClientCerts = nullptr;
tlsConfig.certificate = nullptr;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines are redundant with the {} initializer (which basically memsets the whole thing to 0).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... I wondered about that. I wasn't sure that was guaranteed to be initialized. Will remove.

@bmeike bmeike merged commit c6392d3 into android/release/3.0 Nov 8, 2021
@bmeike bmeike deleted the fix/CBL-2542 branch November 8, 2021 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants