Commit 27e0f52
authored
Guard usage with null check to prevent possible NPE during finalization. (#12434)
Motivation:
We need to add a null check to ensure we not throw a NPE if the finalizer of ReferenceCountedOpenSslEngine runs because of an OOME before we assign the field.
Modifications:
- Add null check
- Assign fields first
Result:
No more NPE in finalizer possible1 parent 871dd2e commit 27e0f52
1 file changed
Lines changed: 10 additions & 4 deletions
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| |||
309 | 312 | | |
310 | 313 | | |
311 | 314 | | |
312 | | - | |
313 | | - | |
| 315 | + | |
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
317 | 319 | | |
318 | | - | |
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| |||
561 | 562 | | |
562 | 563 | | |
563 | 564 | | |
564 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
565 | 571 | | |
566 | 572 | | |
567 | 573 | | |
| |||
0 commit comments