diff options
author | andrey <andrey@php.net> | 2012-05-02 15:55:22 +0200 |
---|---|---|
committer | andrey <andrey@php.net> | 2012-05-02 15:55:22 +0200 |
commit | b42d000471a1da27626d4fecb538069409ed61fd (patch) | |
tree | 10fc65ee9c5938edaa7369b414afa2c8dfadddfa /ext/mysqlnd/mysqlnd_ps.c | |
parent | 72507d38fb6701471053ef6bee65dfbe63184ec9 (diff) | |
download | php-git-b42d000471a1da27626d4fecb538069409ed61fd.tar.gz |
Fix for bug#61411
Bug #61411 PDO Segfaults with PERSISTENT == TRUE && EMULATE_PREPARES == FALSE
Wrong allocation, that doesn't follow the scheme of using stmt->persistent
was the root cause of the problem and the crash at free.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ps.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_ps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index b1ce6dfa66..2044390715 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -1630,9 +1630,9 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_one_result)(MYSQLND_STMT * const s, unsigned i mysqlnd_stmt_separate_one_result_bind(s, param_no TSRMLS_CC); /* Guaranteed is that stmt->result_bind is NULL */ if (!stmt->result_bind) { - stmt->result_bind = mnd_ecalloc(stmt->field_count, sizeof(MYSQLND_RESULT_BIND)); + stmt->result_bind = mnd_pecalloc(stmt->field_count, sizeof(MYSQLND_RESULT_BIND), stmt->persistent); } else { - stmt->result_bind = mnd_erealloc(stmt->result_bind, stmt->field_count * sizeof(MYSQLND_RESULT_BIND)); + stmt->result_bind = mnd_perealloc(stmt->result_bind, stmt->field_count * sizeof(MYSQLND_RESULT_BIND), stmt->persistent); } if (!stmt->result_bind) { DBG_RETURN(FAIL); |