From 8915ad69fbb0f60898f962a67efa8f1b9ebced5a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 6 May 2014 04:06:58 +0400 Subject: [PATCH] Fixed memory leaks --- ext/pdo/pdo_stmt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 45d73fb669..a0a3a8b5fc 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -811,7 +811,12 @@ static int do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs TSRMLS_DC) / { /* fci.size is used to check if it is valid */ if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { - efree(stmt->fetch.cls.fci.params); + if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { + /* Added to free constructor arguments ??? */ + zend_fcall_info_args_clear(&stmt->fetch.cls.fci, 1); + } else { + efree(stmt->fetch.cls.fci.params); + } stmt->fetch.cls.fci.params = NULL; } -- 2.50.1