Skip to content

Commit f4b5a51

Browse files
committed
Fixed memory leak
1 parent d3c337e commit f4b5a51

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Zend/zend_vm_def.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_helper, VAR|UNUSED|CV, CONST|TMP|VAR|UNU
471471

472472
if (increment_opline) {
473473
ZEND_VM_INC_OPCODE();
474+
FREE_OP(free_op_data1);
474475
FREE_OP_VAR_PTR(free_op_data2);
475476
}
476477
FREE_OP1_VAR_PTR();

Zend/zend_vm_execute.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8228,6 +8228,7 @@ static int zend_binary_assign_op_helper_SPEC_VAR_CONST(int (*binary_op)(zval *re
82288228

82298229
if (increment_opline) {
82308230
ZEND_VM_INC_OPCODE();
8231+
FREE_OP(free_op_data1);
82318232
FREE_OP_VAR_PTR(free_op_data2);
82328233
}
82338234
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
@@ -9643,6 +9644,7 @@ static int zend_binary_assign_op_helper_SPEC_VAR_TMP(int (*binary_op)(zval *resu
96439644

96449645
if (increment_opline) {
96459646
ZEND_VM_INC_OPCODE();
9647+
FREE_OP(free_op_data1);
96469648
FREE_OP_VAR_PTR(free_op_data2);
96479649
}
96489650
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
@@ -11061,6 +11063,7 @@ static int zend_binary_assign_op_helper_SPEC_VAR_VAR(int (*binary_op)(zval *resu
1106111063

1106211064
if (increment_opline) {
1106311065
ZEND_VM_INC_OPCODE();
11066+
FREE_OP(free_op_data1);
1106411067
FREE_OP_VAR_PTR(free_op_data2);
1106511068
}
1106611069
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
@@ -12282,6 +12285,7 @@ static int zend_binary_assign_op_helper_SPEC_VAR_UNUSED(int (*binary_op)(zval *r
1228212285

1228312286
if (increment_opline) {
1228412287
ZEND_VM_INC_OPCODE();
12288+
FREE_OP(free_op_data1);
1228512289
FREE_OP_VAR_PTR(free_op_data2);
1228612290
}
1228712291
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
@@ -12894,6 +12898,7 @@ static int zend_binary_assign_op_helper_SPEC_VAR_CV(int (*binary_op)(zval *resul
1289412898

1289512899
if (increment_opline) {
1289612900
ZEND_VM_INC_OPCODE();
12901+
FREE_OP(free_op_data1);
1289712902
FREE_OP_VAR_PTR(free_op_data2);
1289812903
}
1289912904
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
@@ -14183,6 +14188,7 @@ static int zend_binary_assign_op_helper_SPEC_UNUSED_CONST(int (*binary_op)(zval
1418314188

1418414189
if (increment_opline) {
1418514190
ZEND_VM_INC_OPCODE();
14191+
FREE_OP(free_op_data1);
1418614192
FREE_OP_VAR_PTR(free_op_data2);
1418714193
}
1418814194

@@ -15261,6 +15267,7 @@ static int zend_binary_assign_op_helper_SPEC_UNUSED_TMP(int (*binary_op)(zval *r
1526115267

1526215268
if (increment_opline) {
1526315269
ZEND_VM_INC_OPCODE();
15270+
FREE_OP(free_op_data1);
1526415271
FREE_OP_VAR_PTR(free_op_data2);
1526515272
}
1526615273

@@ -16300,6 +16307,7 @@ static int zend_binary_assign_op_helper_SPEC_UNUSED_VAR(int (*binary_op)(zval *r
1630016307

1630116308
if (increment_opline) {
1630216309
ZEND_VM_INC_OPCODE();
16310+
FREE_OP(free_op_data1);
1630316311
FREE_OP_VAR_PTR(free_op_data2);
1630416312
}
1630516313

@@ -17338,6 +17346,7 @@ static int zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(int (*binary_op)(zval
1733817346

1733917347
if (increment_opline) {
1734017348
ZEND_VM_INC_OPCODE();
17349+
FREE_OP(free_op_data1);
1734117350
FREE_OP_VAR_PTR(free_op_data2);
1734217351
}
1734317352

@@ -17703,6 +17712,7 @@ static int zend_binary_assign_op_helper_SPEC_UNUSED_CV(int (*binary_op)(zval *re
1770317712

1770417713
if (increment_opline) {
1770517714
ZEND_VM_INC_OPCODE();
17715+
FREE_OP(free_op_data1);
1770617716
FREE_OP_VAR_PTR(free_op_data2);
1770717717
}
1770817718

@@ -20115,6 +20125,7 @@ static int zend_binary_assign_op_helper_SPEC_CV_CONST(int (*binary_op)(zval *res
2011520125

2011620126
if (increment_opline) {
2011720127
ZEND_VM_INC_OPCODE();
20128+
FREE_OP(free_op_data1);
2011820129
FREE_OP_VAR_PTR(free_op_data2);
2011920130
}
2012020131

@@ -21522,6 +21533,7 @@ static int zend_binary_assign_op_helper_SPEC_CV_TMP(int (*binary_op)(zval *resul
2152221533

2152321534
if (increment_opline) {
2152421535
ZEND_VM_INC_OPCODE();
21536+
FREE_OP(free_op_data1);
2152521537
FREE_OP_VAR_PTR(free_op_data2);
2152621538
}
2152721539

@@ -22932,6 +22944,7 @@ static int zend_binary_assign_op_helper_SPEC_CV_VAR(int (*binary_op)(zval *resul
2293222944

2293322945
if (increment_opline) {
2293422946
ZEND_VM_INC_OPCODE();
22947+
FREE_OP(free_op_data1);
2293522948
FREE_OP_VAR_PTR(free_op_data2);
2293622949
}
2293722950

@@ -24144,6 +24157,7 @@ static int zend_binary_assign_op_helper_SPEC_CV_UNUSED(int (*binary_op)(zval *re
2414424157

2414524158
if (increment_opline) {
2414624159
ZEND_VM_INC_OPCODE();
24160+
FREE_OP(free_op_data1);
2414724161
FREE_OP_VAR_PTR(free_op_data2);
2414824162
}
2414924163

@@ -24755,6 +24769,7 @@ static int zend_binary_assign_op_helper_SPEC_CV_CV(int (*binary_op)(zval *result
2475524769

2475624770
if (increment_opline) {
2475724771
ZEND_VM_INC_OPCODE();
24772+
FREE_OP(free_op_data1);
2475824773
FREE_OP_VAR_PTR(free_op_data2);
2475924774
}
2476024775

0 commit comments

Comments
 (0)