cvs: php-src(PHP_5_1) /ext/pdo_pgsql pgsql_driver.c pgsql_statement.c
| From: | Ilia Alshanetsky | Date: | Thu, 01 Dec 2005 16:33:02 +0000 |
| Subject: | cvs: php-src(PHP_5_1) /ext/pdo_pgsql pgsql_driver.c pgsql_statement.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-35567@lists.php.net to get a copy of this message | ||
iliaa Thu Dec 1 11:33:02 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src/ext/pdo_pgsql pgsql_driver.c pgsql_statement.c
Log:
Fixed memory leaks
http://cvs.php.net/diff.php/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.53.2.5&r2=1.53.2.6&ty=u
Index: php-src/ext/pdo_pgsql/pgsql_driver.c
diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.5 php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.6
--- php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.5 Wed Nov 30 18:27:15 2005
+++ php-src/ext/pdo_pgsql/pgsql_driver.c Thu Dec 1 11:33:01 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql_driver.c,v 1.53.2.5 2005/11/30 23:27:15 iliaa Exp $ */
+/* $Id: pgsql_driver.c,v 1.53.2.6 2005/12/01 16:33:01 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -248,7 +248,7 @@
/* that's all for now; we'll defer the actual prepare until the first execute call */
if (nsql) {
- S->query = estrdup(nsql);
+ S->query = nsql;
} else {
S->query = estrdup(sql);
}
http://cvs.php.net/diff.php/php-src/ext/pdo_pgsql/pgsql_statement.c?r1=1.31.2.6&r2=1.31.2.7&ty=u
Index: php-src/ext/pdo_pgsql/pgsql_statement.c
diff -u php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.6
php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.7
--- php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.6 Wed Nov 30 18:27:15 2005
+++ php-src/ext/pdo_pgsql/pgsql_statement.c Thu Dec 1 11:33:01 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql_statement.c,v 1.31.2.6 2005/11/30 23:27:15 iliaa Exp $ */
+/* $Id: pgsql_statement.c,v 1.31.2.7 2005/12/01 16:33:01 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -76,6 +76,10 @@
efree(S->param_formats);
S->param_formats = NULL;
}
+ if (S->param_types) {
+ efree(S->param_types);
+ S->param_types = NULL;
+ }
if (S->query) {
efree(S->query);
S->query = NULL;