Bug #9562 Updated: Memory leak in ext/pgsql/pgsql.c

From: Date: Sun, 29 Apr 2001 17:35:27 +0000
Subject: Bug #9562 Updated: Memory leak in ext/pgsql/pgsql.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-52961@lists.php.net to get a copy of this message
ID: 9562 Updated by: zeev Reported By: ales@deuce.sta.si Old-Status: Open Status: Closed Bug Type: Reproduceable crash PHP Version: 4.0.4pl1 Assigned To: Comments: Your fix was incorporated to the CVS, and will be a part of PHP 4.0.6. Thanks! Previous Comments: --------------------------------------------------------------------------- [2001-03-05 10:11:09] ales@deuce.sta.si Script for reproducing bug: while(!($con=@pg_pconnect("dbname=web"))) { sleep(1); } The system must be under heavy load for bug to become apparent. Suggested correction in ext/pgsql/pgsql.c (added lines are marked with ***): if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) { *** if(pgsql) { *** PQfinish(pgsql); *** pgsql=0; *** } php_error(E_WARNING,"Unable to connect to PostgreSQL server: %s",PQerrorMessage(pgsql)); efree(hashed_details); RETURN_FALSE; } --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9562&edit=2

« previous php.dev (#52961) next »