mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-28 11:25:44 +00:00
Fixed memory leak (ext/standard/tests/file/stream_002.phpt)
This commit is contained in:
1 parent
dc889b69ef
commit
cb5e9eac9f
1 file changed
+3
@@ -120,10 +120,12 @@ PHP_FUNCTION(stream_socket_client)
|
||||
tv.tv_usec = conv % 1000000;
|
||||
#endif
|
||||
if (zerrno) {
|
||||
zerrno = Z_REFVAL_P(zerrno);
|
||||
zval_dtor(zerrno);
|
||||
ZVAL_LONG(zerrno, 0);
|
||||
}
|
||||
if (zerrstr) {
|
||||
zerrstr = Z_REFVAL_P(zerrstr);
|
||||
zval_dtor(zerrstr);
|
||||
ZVAL_EMPTY_STRING(zerrstr);
|
||||
}
|
||||
@@ -156,6 +158,7 @@ PHP_FUNCTION(stream_socket_client)
|
||||
zval_dtor(zerrstr);
|
||||
//??? ZVAL_STRING(zerrstr, errstr, 0);
|
||||
ZVAL_STRING(zerrstr, errstr);
|
||||
efree(errstr);
|
||||
} else if (errstr) {
|
||||
efree(errstr);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user