summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_driver.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-09-23 21:03:41 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-09-23 21:03:41 +0000
commit626caf02923598d06be0f65fff8faa4826f3c008 (patch)
treed0e3c72ac55701e8f5b6176259ee9f50382ff95c /ext/pdo_mysql/mysql_driver.c
parent72040f7f2a4c38db6eca1a6a1dc9e40e70934fbe (diff)
downloadphp-git-626caf02923598d06be0f65fff8faa4826f3c008.tar.gz
Make error messages handle persistent environments properly.
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
-rwxr-xr-xext/pdo_mysql/mysql_driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index bbad743862..80eacfec39 100755
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -42,12 +42,12 @@ int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int lin
einfo->line = line;
if (einfo->errmsg) {
- efree(einfo->errmsg);
+ pefree(einfo->errmsg, dbh->is_persistent);
einfo->errmsg = NULL;
}
if (einfo->errcode) {
- einfo->errmsg = estrdup(mysql_error(H->server));
+ einfo->errmsg = pestrdup(mysql_error(H->server), dbh->is_persistent);
} else { /* no error */
*pdo_err = PDO_ERR_NONE;
return 0;
@@ -149,7 +149,7 @@ static int mysql_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
H->server = NULL;
}
if (H->einfo.errmsg) {
- efree(H->einfo.errmsg);
+ pefree(H->einfo.errmsg, dbh->is_persistent);
H->einfo.errmsg = NULL;
}
pefree(H, dbh->is_persistent);