iliaa           Mon Jul 28 14:57:50 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/main       streams.c 
  Log:
  MFH: Fixed a double free bug when freeing persistent streams.
  
  
Index: php-src/main/streams.c
diff -u php-src/main/streams.c:1.125.2.71 php-src/main/streams.c:1.125.2.72
--- php-src/main/streams.c:1.125.2.71   Fri Jun 27 12:16:46 2003
+++ php-src/main/streams.c      Mon Jul 28 14:57:49 2003
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.125.2.71 2003/06/27 16:16:46 pollita Exp $ */
+/* $Id: streams.c,v 1.125.2.72 2003/07/28 18:57:49 iliaa Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -280,7 +280,7 @@
 
 static int _php_stream_free_persistent(list_entry *le, void *pStream TSRMLS_DC)
 {
-       return le->ptr == pStream;
+       return (le->ptr == pStream && !((php_stream *)pStream)->in_free);
 }
 
 PHPAPI int _php_stream_free(php_stream *stream, int close_options TSRMLS_DC) /* {{{ */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to