-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit 216e87a
Fix memory leak in zip when encountering empty glob result
The case of returning 0 is inconsistent in when it returns an empty
array, furthermore the caller already returns an empty array.
Because the caller overwrites the return value in these cases, it can
cause a memory leak.
This is easier to trigger on master in some cases as different code paths
are taken with the new bundled glob. On some platforms it is also
triggerable on 8.3.
Closes GH-19715.1 parent 0e668e5 commit 216e87a
2 files changed
+3
-2
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 | + | ||
56 | + | ||
57 | + | ||
55 | 58 |
| |
56 | 59 |
| |
57 | 60 |
| |
|
Lines changed: 0 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
668 | 668 |
| |
669 | 669 |
| |
670 | 670 |
| |
671 | - | ||
672 | 671 |
| |
673 | 672 |
| |
674 | 673 |
| |
| |||
677 | 676 |
| |
678 | 677 |
| |
679 | 678 |
| |
680 | - | ||
681 | 679 |
| |
682 | 680 |
| |
683 | 681 |
| |
|
0 commit comments