mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Fix segfault for scripts like this:
<?php pfsockopen("foo"); pfsockopen("foo"); ?> Where the transport fails to connect (since args are bogus); the problem was that the persistent stream entry was not correctly freed.
This commit is contained in:
parent
4af9e35316
commit
e1ae61802b
1 changed files with 5 additions and 1 deletions
|
@ -163,7 +163,11 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, long namelen, int
|
||||||
|
|
||||||
if (failed) {
|
if (failed) {
|
||||||
/* failure means that they don't get a stream to play with */
|
/* failure means that they don't get a stream to play with */
|
||||||
|
if (persistent_id) {
|
||||||
|
php_stream_pclose(stream);
|
||||||
|
} else {
|
||||||
php_stream_close(stream);
|
php_stream_close(stream);
|
||||||
|
}
|
||||||
stream = NULL;
|
stream = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue