felipe Mon Feb 9 12:07:11 2009 UTC
Modified files:
/php-src/ext/pdo_firebird firebird_statement.c
Log:
- Fix mem. leak
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_firebird/firebird_statement.c?r1=1.25&r2=1.26&diff_format=u
Index: php-src/ext/pdo_firebird/firebird_statement.c
diff -u php-src/ext/pdo_firebird/firebird_statement.c:1.25
php-src/ext/pdo_firebird/firebird_statement.c:1.26
--- php-src/ext/pdo_firebird/firebird_statement.c:1.25 Wed Dec 31 11:12:34 2008
+++ php-src/ext/pdo_firebird/firebird_statement.c Mon Feb 9 12:07:10 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: firebird_statement.c,v 1.25 2008/12/31 11:12:34 sebastian Exp $ */
+/* $Id: firebird_statement.c,v 1.26 2009/02/09 12:07:10 felipe Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -466,6 +466,9 @@
case PDO_PARAM_EVT_ALLOC:
if (param->is_param) {
/* allocate the parameter */
+ if (var->sqlind) {
+ efree(var->sqlind);
+ }
var->sqlind = (void*)emalloc(var->sqllen +
2*sizeof(short));
var->sqldata =
&((char*)var->sqlind)[sizeof(short)];
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php