Commit 6457746
committed
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: nodejs#2308
PR-URL: nodejs#2352
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>1 parent 2781333 commit 6457746
4 files changed
Lines changed: 10 additions & 5 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 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4479 | 4479 | | |
4480 | 4480 | | |
4481 | 4481 | | |
4482 | | - | |
| 4482 | + | |
4483 | 4483 | | |
4484 | 4484 | | |
4485 | 4485 | | |
| |||
4544 | 4544 | | |
4545 | 4545 | | |
4546 | 4546 | | |
4547 | | - | |
| 4547 | + | |
4548 | 4548 | | |
4549 | 4549 | | |
4550 | 4550 | | |
| |||
4947 | 4947 | | |
4948 | 4948 | | |
4949 | 4949 | | |
4950 | | - | |
| 4950 | + | |
4951 | 4951 | | |
4952 | 4952 | | |
4953 | 4953 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
| 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