diff options
author | Felipe Pena <felipe@php.net> | 2008-07-22 14:09:24 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-07-22 14:09:24 +0000 |
commit | fdfbfb96a14f46aa7ff457d97e713725c0e69e32 (patch) | |
tree | 966f191df49221395fdda380b986c8e210dab797 /ext/standard/fsock.c | |
parent | cb3bc158076026430722bb408c736496b1c88277 (diff) | |
download | php-git-fdfbfb96a14f46aa7ff457d97e713725c0e69e32.tar.gz |
- MFH: Fixed bug #44246 (closedir() accepts a file resource opened by fopen())
Diffstat (limited to 'ext/standard/fsock.c')
-rw-r--r-- | ext/standard/fsock.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index 31774f554c..7fd30f80c0 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -79,6 +79,8 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent) stream = php_stream_xport_create(hostname, hostname_len, ENFORCE_SAFE_MODE | REPORT_ERRORS, STREAM_XPORT_CLIENT | STREAM_XPORT_CONNECT, hashkey, &tv, NULL, &errstr, &err); + stream->flags |= PHP_STREAM_FLAG_FCLOSE; + if (port > 0) { efree(hostname); } |