iliaa Mon Oct 14 22:05:28 2002 EDT
Modified files:
/php4/main user_streams.c
Log:
Fixed possible memory leaks.
Index: php4/main/user_streams.c
diff -u php4/main/user_streams.c:1.28 php4/main/user_streams.c:1.29
--- php4/main/user_streams.c:1.28 Mon Oct 14 21:57:19 2002
+++ php4/main/user_streams.c Mon Oct 14 22:05:27 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: user_streams.c,v 1.28 2002/10/15 01:57:19 wez Exp $ */
+/* $Id: user_streams.c,v 1.29 2002/10/15 02:05:27 iliaa Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -586,6 +586,10 @@
/* stream_seek is not implemented, so disable seeks for this stream */
stream->flags |= PHP_STREAM_FLAG_NO_SEEK;
/* there should be no retval to clean up */
+
+ if (retval)
+ zval_ptr_dtor(&retval);
+
return -1;
} else if (call_result == SUCCESS && retval != NULL && zval_is_true(retval)) {
ret = 0;
@@ -681,6 +685,10 @@
us->wrapper->classname);
}
}
+
+ if (retval)
+ zval_ptr_dtor(&retval);
+
return ret;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php