Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH-14639: Member access within null pointer in ext/spl/spl_observ…
…er.c `spl_object_storage_attach_handle` creates an entry already, but only fills it in at the end with `spl_object_storage_create_element` which allocates memory. In this case the allocation fails and we're left with a NULL slot. Doing the allocation first isn't an option because we want to check whether the slot is occupied before allocating memory. The simplest solution is to set the entry to NULL and check for a NULL pointer upon destruction. Closes GH-14849.
- Loading branch information