summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_driver.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-12-20 14:50:12 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-12-20 14:50:12 +0000
commit5961160f95b83d55feba5d6afe56f60106e1b39c (patch)
tree055ab1ef4f115b085b0de58376f4a3e4422812e2 /ext/pdo_sqlite/sqlite_driver.c
parentcd82349b9e51c6986ede11f482f727e12717a6f5 (diff)
downloadphp-git-5961160f95b83d55feba5d6afe56f60106e1b39c.tar.gz
Proper error handling for persistent connections.
Diffstat (limited to 'ext/pdo_sqlite/sqlite_driver.c')
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index d53dfa8c1a..cf0a51d59b 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -43,9 +43,9 @@ int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int li
if (einfo->errcode != SQLITE_OK) {
if (einfo->errmsg) {
- efree(einfo->errmsg);
+ pefree(einfo->errmsg, dbh->is_persistent);
}
- einfo->errmsg = estrdup((char*)sqlite3_errmsg(H->db));
+ einfo->errmsg = pestrdup((char*)sqlite3_errmsg(H->db), dbh->is_persistent);
} else { /* no error */
strcpy(*pdo_err, PDO_ERR_NONE);
return 0;
@@ -144,7 +144,7 @@ static int sqlite_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
H->db = NULL;
}
if (einfo->errmsg) {
- efree(einfo->errmsg);
+ pefree(einfo->errmsg, dbh->is_persistent);
einfo->errmsg = NULL;
}
pefree(H, dbh->is_persistent);