Bug Fix of double freeing. It used to create a new object for all get commands of class/struct pointers.
Now creating only if newobject is lit, or else creating a basic zend object to return to user.
This commit is contained in:
parent
9addd37640
commit
42f012b2d1
1 changed files with 3 additions and 1 deletions
|
|
@ -1162,7 +1162,9 @@ public:
|
|||
if (retType_class) {
|
||||
String *retZend_obj = NewStringEmpty();
|
||||
Printf(retZend_obj, "%s_object_new(%s_ce)", retType_class, retType_class);
|
||||
Replaceall(tm, "$zend_obj", retType_valid ? (constructor ? "NULL" : retZend_obj) : "NULL");
|
||||
String *ret_other_Zend_obj = NewStringEmpty();
|
||||
Printf(ret_other_Zend_obj, "zend_objects_new(%s_ce)", retType_class);
|
||||
Replaceall(tm, "$zend_obj", retType_valid ? (constructor ? "NULL" : (newobject ? retZend_obj : ret_other_Zend_obj)) : "NULL");
|
||||
}
|
||||
Replaceall(tm, "$newobj", retType_valid ? "1" : "2");
|
||||
Replaceall(tm, "$c_obj", constructor? "1" : "0");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue