summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index e82379127e..6e870c20b0 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -1478,7 +1478,7 @@ PHP_FUNCTION(pg_trace)
php_stream_close(stream);
RETURN_FALSE;
}
- ZEND_REGISTER_RESOURCE(NULL, stream, php_file_le_stream());
+ php_stream_auto_cleanup(stream);
PQtrace(pgsql, fp);
RETURN_TRUE;
}