[php-src] PR #14839: GH-14286 (ffi enum type (when enum has no name) make memory leak)
| From: | nielsdos | Date: | Fri, 05 Jul 2024 23:11:00 +0000 |
| Subject: | [php-src] PR #14839: GH-14286 (ffi enum type (when enum has no name) make memory leak) | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-27072@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/14839
Author: nielsdos
For top-level anonymous type definition we never store the declaration anywhere else nor the type
anywhere else.
The declaration keeps owning the type and it goes out of scope. For anonymous fields this gets
handled by the add_anonymous_field code that removes the type from the declaration.
This patch does something similar in the parsing code when it is detected we're dealing with an
anonymous enum in a top-level declaration.