Commit 3ae5252
committed
Fix memory leak in lexer token string allocation
The emit_token_with_str label was unconditionally allocating strings via
zend_copy_value, but these strings were only consumed when in parser mode
(i.e., when elem != NULL). When not in parser mode, the allocated strings
were never freed, causing memory leaks detected by LeakSanitizer.1 parent 5bc45dc commit 3ae5252
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3204 | 3204 | | |
3205 | 3205 | | |
3206 | 3206 | | |
3207 | | - | |
| 3207 | + | |
| 3208 | + | |
| 3209 | + | |
3208 | 3210 | | |
3209 | 3211 | | |
3210 | 3212 | | |
| |||
0 commit comments