[PHP] Fix access to already released memory

Fix access to already released memory during PHP module  shutdown, which
often didn't cause visible problems, but could result in segmentation
faults, bus errors, etc.  Fixes #1170, reported by Jitka Plesníková.
This commit is contained in:
Olly Betts 2019-02-09 17:08:21 +13:00
commit ab754b0c65
3 changed files with 11 additions and 5 deletions

View file

@ -7,7 +7,7 @@
%init %{
SWIG_php_minit {
SWIG_InitializeModule(0);
SWIG_InitializeModule((void*)&module_number);
%}
%fragment("swig_php_init_member_ptr2", "header") %{