Decref the DBH object when storing the errored query statement --
the DBH owns the stmt, so it will live long enough.
/* something broke */
dbh->query_stmt = stmt;
ZVAL_COPY_VALUE(&dbh->query_stmt_zval, return_value);
+ Z_DELREF(stmt->database_object_handle);
+ ZVAL_UNDEF(&stmt->database_object_handle);
PDO_HANDLE_STMT_ERR();
} else {
PDO_HANDLE_DBH_ERR();
}
/* }}} */
-static int do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs) /* {{{ */
+static void do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs) /* {{{ */
{
/* fci.size is used to check if it is valid */
if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) {
efree(stmt->fetch.func.values);
stmt->fetch.func.values = NULL;
}
- return 1;
}
/* }}} */