Commit bff9bcd
src: plug memory leaks
In a few places dynamic memory was passed to the Buffer::New() overload
that makes a copy of the input, not the one that takes ownership.
This commit is a band-aid to fix the memory leaks. Longer term, we
should look into using C++11 move semantics more effectively.
Fixes: #2308
PR-URL: #2352
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>1 parent 1f12e03 commit bff9bcdCopy full SHA for bff9bcd
File tree
Expand file treeCollapse file tree
4 files changed
+10
-5
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
4 files changed
+10
-5
lines changedOpen diff view settings
Collapse file
+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
67 | 67 | |
68 | 68 | |
69 | 69 | |
| 70 | + |
70 | 71 | |
| 72 | + |
71 | 73 | |
72 | 74 | |
73 | 75 | |
74 | 76 | |
75 | 77 | |
| 78 | + |
| 79 | + |
| 80 | + |
76 | 81 | |
77 | 82 | |
78 | 83 | |
|
Collapse file
+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4477 | 4477 | |
4478 | 4478 | |
4479 | 4479 | |
4480 | | - |
| 4480 | + |
4481 | 4481 | |
4482 | 4482 | |
4483 | 4483 | |
| ||
4542 | 4542 | |
4543 | 4543 | |
4544 | 4544 | |
4545 | | - |
| 4545 | + |
4546 | 4546 | |
4547 | 4547 | |
4548 | 4548 | |
| ||
4945 | 4945 | |
4946 | 4946 | |
4947 | 4947 | |
4948 | | - |
| 4948 | + |
4949 | 4949 | |
4950 | 4950 | |
4951 | 4951 | |
|
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
223 | 223 | |
224 | 224 | |
225 | 225 | |
226 | | - |
| 226 | + |
227 | 227 | |
228 | 228 | |
229 | 229 | |
|
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
408 | 408 | |
409 | 409 | |
410 | 410 | |
411 | | - |
| 411 | + |
412 | 412 | |
413 | 413 | |
414 | 414 | |
|
0 commit comments