diff options
author | Andrey Hristov <andrey@php.net> | 2010-03-12 13:03:46 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-03-12 13:03:46 +0000 |
commit | ccfd9cd744c700dfc26f73ae47036fb5ad780b4a (patch) | |
tree | 79392547912de600fcf6cd80cc12232c3c7180f1 /ext/mysqli/mysqli_api.c | |
parent | af49e58f5155383a440041c77cc1ecbaf507fde7 (diff) | |
download | php-git-ccfd9cd744c700dfc26f73ae47036fb5ad780b4a.tar.gz |
allow persistency of PS
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r-- | ext/mysqli/mysqli_api.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 5c9cd6e0a2..f156346990 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -166,7 +166,7 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned in if (argc == start) { return PASS; } - params = safe_emalloc(argc - start, sizeof(MYSQLND_PARAM_BIND), 0); + params = mysqlnd_stmt_alloc_param_bind(stmt->stmt); for (i = 0; i < (argc - start); i++) { zend_uchar type; switch (types[i]) { @@ -190,7 +190,7 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned in /* We count parameters from 1 */ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Undefined fieldtype %c (parameter %d)", types[i], i + start + 1); ret = FAIL; - efree(params); + mysqlnd_stmt_free_param_bind(stmt->stmt, params); goto end; } params[i].zv = *(args[i + start]); @@ -452,9 +452,7 @@ static int mysqli_stmt_bind_result_do_bind(MY_STMT *stmt, zval ***args, unsigned int argc, unsigned int start TSRMLS_DC) { unsigned int i; - MYSQLND_RESULT_BIND *params; - - params = safe_emalloc(argc - start, sizeof(MYSQLND_RESULT_BIND), 0); + MYSQLND_RESULT_BIND * params = mysqlnd_stmt_alloc_result_bind(stmt->stmt); for (i = 0; i < (argc - start); i++) { params[i].zv = *(args[i + start]); } |