Reordering PDO statement dtor sequence?

From: Date: Thu, 16 Jul 2015 01:16:40 +0000
Subject: Reordering PDO statement dtor sequence?
Groups: php.internals php.pdo 
Request: Send a blank email to internals+get-87193@lists.php.net to get a copy of this message
We are looking at reordering the PDO statement-free dtors to fix a resource leak in PDO_OCI. Let me know if this will affect other drivers. Chris *** pdo_stmt.c.orig 2015-07-15 09:56:18.986187123 -0700 --- pdo_stmt.c 2015-07-15 09:57:22.292453715 -0700 *************** *** 2300,2305 **** --- 2300,2309 ---- PDO_API void php_pdo_free_statement(pdo_stmt_t *stmt) { +
+     if (stmt->methods && stmt->methods->dtor) {
+         stmt->methods->dtor(stmt);
+     }
if (stmt->bound_params) { zend_hash_destroy(stmt->bound_params); FREE_HASHTABLE(stmt->bound_params); *************** *** 2316,2324 **** stmt->bound_columns = NULL; } - if (stmt->methods && stmt->methods->dtor) { - stmt->methods->dtor(stmt); - } if (stmt->query_string) { efree(stmt->query_string); } --- 2320,2325 ---- -- http://twitter.com/ghrd

« previous php.internals (#87193) next »