cvs: php4 /main user_streams.c
| From: | Ilia Alshanetsky | Date: | Tue, 15 Oct 2002 02:05:28 +0000 |
| Subject: | cvs: php4 /main user_streams.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-14928@lists.php.net to get a copy of this message | ||
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;
}