mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08: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
@ -163,7 +163,11 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, long namelen, int
|
||||
|
||||
if (failed) {
|
||||
/* failure means that they don't get a stream to play with */
|
||||
php_stream_close(stream);
|
||||
if (persistent_id) {
|
||||
php_stream_pclose(stream);
|
||||
} else {
|
||||
php_stream_close(stream);
|
||||
}
|
||||
stream = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user