Commit 36f5d71
committed
Fix leak on foreach by ref assign to property
In this case we ended up creating an ASSIGN_OBJ_REF with VAR
result operand, which was not freed.
Fix this by implementing assign_ref_znode the same was as
assign_znode, i.e. performing an assignment with result and
then freeing the result, which will result mark the result as
UNUSED. This is more robust than the special handling for
result == NULL that was used before.
This fixes one of the issues reported in bug #81190.1 parent 334387b commit 36f5d71
2 files changed
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2888 | 2888 | | |
2889 | 2889 | | |
2890 | 2890 | | |
2891 | | - | |
2892 | | - | |
2893 | | - | |
| 2891 | + | |
2894 | 2892 | | |
2895 | 2893 | | |
2896 | 2894 | | |
2897 | 2895 | | |
2898 | 2896 | | |
2899 | | - | |
2900 | | - | |
2901 | | - | |
| 2897 | + | |
2902 | 2898 | | |
2903 | 2899 | | |
2904 | 2900 | | |
| |||
2908 | 2904 | | |
2909 | 2905 | | |
2910 | 2906 | | |
| 2907 | + | |
2911 | 2908 | | |
2912 | 2909 | | |
2913 | | - | |
| 2910 | + | |
| 2911 | + | |
2914 | 2912 | | |
2915 | 2913 | | |
2916 | 2914 | | |
| |||
0 commit comments