This patch fixes a scenario in which the ssl_ object was freed.

BUG=webrtc:383141571

Change-Id: I413b028473aff9c3078f9bbab8e1fee718623417
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372340
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43621}
This commit is contained in:
Jonas Oreland 2024-12-20 12:59:40 +01:00 committed by WebRTC LUCI CQ
parent 3afd7d127e
commit 6660e43c30

View File

@ -930,10 +930,12 @@ int OpenSSLStreamAdapter::ContinueSSL() {
} }
} }
struct timeval timeout; if (ssl_ != nullptr) {
if (DTLSv1_get_timeout(ssl_, &timeout)) { struct timeval timeout;
int delay = timeout.tv_sec * 1000 + timeout.tv_usec / 1000; if (DTLSv1_get_timeout(ssl_, &timeout)) {
SetTimeout(delay); int delay = timeout.tv_sec * 1000 + timeout.tv_usec / 1000;
SetTimeout(delay);
}
} }
return 0; return 0;