mirror of
https://github.com/php/php-src.git
synced 2024-11-30 13:25:43 +08:00
fix memleak due to missing pthread_attr_destroy()
-call
Closes GH-14510
This commit is contained in:
parent
b4325d6113
commit
3c65375adb
4
NEWS
4
NEWS
@ -26,6 +26,8 @@ PHP NEWS
|
||||
. Adjusted closure names to include the parent function's name. (timwolla)
|
||||
. Improve randomness of uploaded file names and files created by tempnam().
|
||||
(Arnaud)
|
||||
. Fixed bug GH-14510 (memleak due to missing pthread_attr_destroy()-call).
|
||||
(Florian Engelhardt)
|
||||
|
||||
- Curl:
|
||||
. Deprecated the CURLOPT_BINARYTRANSFER constant. (divinity76)
|
||||
@ -196,7 +198,7 @@ PHP NEWS
|
||||
. Added class Pdo\Pgsql. (danack, kocsismate)
|
||||
. Retrieve the memory usage of the query result resource. (KentarouTakeda)
|
||||
. Added Pdo\Pgsql::setNoticeCallBack method to receive DB notices.
|
||||
(outtersg)
|
||||
(outtersg)
|
||||
|
||||
- PDO_SQLITE:
|
||||
. Added class Pdo\Sqlite. (danack, kocsismate)
|
||||
|
@ -139,6 +139,7 @@ static bool zend_call_stack_get_linux_pthread(zend_call_stack *stack)
|
||||
|
||||
error = pthread_attr_getstack(&attr, &addr, &max_size);
|
||||
if (error) {
|
||||
pthread_attr_destroy(&attr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -148,6 +149,7 @@ static bool zend_call_stack_get_linux_pthread(zend_call_stack *stack)
|
||||
/* In glibc prior to 2.8, addr and size include the guard pages */
|
||||
error = pthread_attr_getguardsize(&attr, &guard_size);
|
||||
if (error) {
|
||||
pthread_attr_destroy(&attr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -159,6 +161,8 @@ static bool zend_call_stack_get_linux_pthread(zend_call_stack *stack)
|
||||
stack->base = (int8_t*)addr + max_size;
|
||||
stack->max_size = max_size;
|
||||
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
return true;
|
||||
}
|
||||
# else /* defined(HAVE_PTHREAD_GETATTR_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK) */
|
||||
|
Loading…
Reference in New Issue
Block a user