summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/pgsql_driver.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-11-30 23:27:15 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-11-30 23:27:15 +0000
commit911355bee897abca12bcfcb4353c58a65605aed1 (patch)
tree1f0c94ea7053e842e1654418e1289a4ee0404911 /ext/pdo_pgsql/pgsql_driver.c
parentde8052aa41ea8619371f9c326ef70a938c39889e (diff)
downloadphp-git-911355bee897abca12bcfcb4353c58a65605aed1.tar.gz
Fixed memory leak
Diffstat (limited to 'ext/pdo_pgsql/pgsql_driver.c')
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index 65fb948675..67042c5e05 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -248,7 +248,7 @@ static int pgsql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len,
/* that's all for now; we'll defer the actual prepare until the first execute call */
if (nsql) {
- S->query = nsql;
+ S->query = estrdup(nsql);
} else {
S->query = estrdup(sql);
}