File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ PHP NEWS
10
10
values during Generator->throw()). (Bob)
11
11
. Fixed bug GH-14456 (Attempting to initialize class with private constructor
12
12
calls destructor). (Girgias)
13
+ . Fixed bug GH-14510 (memleak due to missing pthread_attr_destroy()-call).
14
+ (Florian Engelhardt)
13
15
14
16
- BCMatch:
15
17
. Fixed bug (bcpowmod() with mod = -1 returns 1 when it must be 0). (Girgias)
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ static bool zend_call_stack_get_linux_pthread(zend_call_stack *stack)
124
124
125
125
error = pthread_attr_getstack (& attr , & addr , & max_size );
126
126
if (error ) {
127
+ pthread_attr_destroy (& attr );
127
128
return false;
128
129
}
129
130
@@ -133,6 +134,7 @@ static bool zend_call_stack_get_linux_pthread(zend_call_stack *stack)
133
134
/* In glibc prior to 2.8, addr and size include the guard pages */
134
135
error = pthread_attr_getguardsize (& attr , & guard_size );
135
136
if (error ) {
137
+ pthread_attr_destroy (& attr );
136
138
return false;
137
139
}
138
140
@@ -144,6 +146,8 @@ static bool zend_call_stack_get_linux_pthread(zend_call_stack *stack)
144
146
stack -> base = (int8_t * )addr + max_size ;
145
147
stack -> max_size = max_size ;
146
148
149
+ pthread_attr_destroy (& attr );
150
+
147
151
return true;
148
152
}
149
153
# else /* defined(HAVE_PTHREAD_GETATTR_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK) */
You can’t perform that action at this time.
0 commit comments