File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 6
6
. Fixed bug #76754 (parent private constant in extends class memory leak).
7
7
(Laruence)
8
8
. Fixed bug #72443 (Generate enabled extension). (petk)
9
+ . Fixed bug #75797 (Memory leak when using class_alias() in non-debug mode).
10
+ (Massimiliano Braglia)
9
11
10
12
- Bz2:
11
13
. Fixed arginfo for bzcompress. (Tyson Andre)
Original file line number Diff line number Diff line change @@ -2774,12 +2774,15 @@ ZEND_API zend_class_entry *zend_register_internal_interface(zend_class_entry *or
2774
2774
ZEND_API int zend_register_class_alias_ex (const char * name , size_t name_len , zend_class_entry * ce ) /* {{{ */
2775
2775
{
2776
2776
zend_string * lcname ;
2777
+ int persistent ;
2778
+
2779
+ persistent = ce -> type != ZEND_USER_CLASS ;
2777
2780
2778
2781
if (name [0 ] == '\\' ) {
2779
- lcname = zend_string_alloc (name_len - 1 , 1 );
2782
+ lcname = zend_string_alloc (name_len - 1 , persistent );
2780
2783
zend_str_tolower_copy (ZSTR_VAL (lcname ), name + 1 , name_len - 1 );
2781
2784
} else {
2782
- lcname = zend_string_alloc (name_len , 1 );
2785
+ lcname = zend_string_alloc (name_len , persistent );
2783
2786
zend_str_tolower_copy (ZSTR_VAL (lcname ), name , name_len );
2784
2787
}
2785
2788
You can’t perform that action at this time.
0 commit comments