Commit c8c593e
authored
Fix memory leak of direct memory. (#3983)
Descriptions of the changes in this PR:
### Motivation
When open a non-exist file for DirectReader, it will throw an exception. The ByteBuf won't release.
When close DirectWriter, if the close failed, the ByteBuf also won't release.1 parent 7f64246 commit c8c593e
File tree
2 files changed
+6
-6
lines changed- bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/directentrylogger
2 files changed
+6
-6
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
| |||
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
| 72 | + | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
0 commit comments