[xdebug-dev] svn: /xdebug/trunk/ xdebug.c

From: Michael Maclean <mgdm[@]php.net>
Date: Thu, 14 Oct 2010 17:28:27 +0000

mgdm Thu, 14 Oct 2010 17:28:26 +0000

Revision: http://svn.xdebug.org/cgi-bin/viewvc.cgi?view=rev&revision=3341&root=xdebug

Log:
Fix memory leak when cli_color is enabled

Changed paths:
    U xdebug/trunk/xdebug.c

Modified: xdebug/trunk/xdebug.c
===================================================================
--- xdebug/trunk/xdebug.c 2010-09-21 22:18:21 UTC (rev 3340)
+++ xdebug/trunk/xdebug.c 2010-10-14 17:28:26 UTC (rev 3341)
@@ -493,16 +493,7 @@
 int xdebug_is_output_tty(TSRMLS_D)
 {
         if (XG(output_is_tty) == OUTPUT_NOT_CHECKED) {
- php_stream *output = php_stream_open_wrapper("php://stdout", "w", REPORT_ERRORS, NULL);
- int fd;
-
- if (php_stream_cast(output, PHP_STREAM_AS_FD, (void *)&fd, REPORT_ERRORS) == FAILURE) {
- XG(output_is_tty) = OUTPUT_NOT_TTY;
- } else if (!isatty(fd)) {
- XG(output_is_tty) = OUTPUT_NOT_TTY;
- } else {
- XG(output_is_tty) = OUTPUT_IS_TTY;
- }
+ XG(output_is_tty) = isatty(STDOUT_FILENO);
         }
         return (XG(output_is_tty));
 }
Received on Thu Oct 14 2010 - 18:28:27 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST