[Greater-commits] r326 - trunk/GREAT-ER-DB/impl/postgresql
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 30 12:44:33 CEST 2011
Author: bricks
Date: 2011-06-30 12:44:33 +0200 (Thu, 30 Jun 2011)
New Revision: 326
Modified:
trunk/GREAT-ER-DB/impl/postgresql/dagreater_pg.pgc
Log:
Global var con must be set to NULL after disconnect
If it's not null it would raise an error with an invalid error information
which could result in a segfault. This issue was spottet by a testcase with double
disconnects
Modified: trunk/GREAT-ER-DB/impl/postgresql/dagreater_pg.pgc
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/dagreater_pg.pgc 2011-06-30 10:41:51 UTC (rev 325)
+++ trunk/GREAT-ER-DB/impl/postgresql/dagreater_pg.pgc 2011-06-30 10:44:33 UTC (rev 326)
@@ -242,7 +242,9 @@
*/
int da_db_disconnect(DA_T_errinfo *vp_errinfo)
{
- return gda_db_disconnect(con, vp_errinfo);
+ int retval = gda_db_disconnect(con, vp_errinfo);
+ con = NULL;
+ return retval;
}
/*********************************************************************
More information about the Greater-commits
mailing list