diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-10-15 02:05:27 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-10-15 02:05:27 +0000 |
commit | bf51192d679d198c3f06968be895d74d015d81f0 (patch) | |
tree | 05084221d8e6a7bb18377f8bfbeacf763a376ef1 | |
parent | 6890f98e708e40e54d0bd0e589e3b5e39c5ca191 (diff) | |
download | php-git-bf51192d679d198c3f06968be895d74d015d81f0.tar.gz |
Fixed possible memory leaks.
-rw-r--r-- | main/user_streams.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/main/user_streams.c b/main/user_streams.c index ac0461320d..b411cc7dad 100644 --- a/main/user_streams.c +++ b/main/user_streams.c @@ -586,6 +586,10 @@ static int php_userstreamop_seek(php_stream *stream, off_t offset, int whence, o /* 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 @@ static int php_userstreamop_stat(php_stream *stream, php_stream_statbuf *ssb TSR us->wrapper->classname); } } + + if (retval) + zval_ptr_dtor(&retval); + return ret; } |