diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 20246eccf3..36e2624eb6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to these authors: Viktor Szakats. */ +2009-05-04 19:40 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + * harbour/contrib/rddsql/sddmy/mysqldd.c + * harbour/contrib/rddsql/sddpg/pgsqldd.c + * added protection against double resource freeing + 2009-05-05 18:09 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/utils/hbi18n/hbi18n.prg * expand wildcards in given file names on non *nix like platforms diff --git a/harbour/contrib/rddsql/sddmy/mysqldd.c b/harbour/contrib/rddsql/sddmy/mysqldd.c index 9b2a648436..17899843bb 100644 --- a/harbour/contrib/rddsql/sddmy/mysqldd.c +++ b/harbour/contrib/rddsql/sddmy/mysqldd.c @@ -447,7 +447,10 @@ static HB_ERRCODE mysqlOpen( SQLBASEAREAP pArea ) static HB_ERRCODE mysqlClose( SQLBASEAREAP pArea ) { if ( pArea->pResult ) + { mysql_free_result( (MYSQL_RES*) pArea->pResult ); + pArea->pResult = NULL; + } return HB_SUCCESS; } diff --git a/harbour/contrib/rddsql/sddpg/pgsqldd.c b/harbour/contrib/rddsql/sddpg/pgsqldd.c index 288ad9a022..4d8ad1e69e 100644 --- a/harbour/contrib/rddsql/sddpg/pgsqldd.c +++ b/harbour/contrib/rddsql/sddpg/pgsqldd.c @@ -473,7 +473,10 @@ static HB_ERRCODE pgsqlOpen( SQLBASEAREAP pArea ) static HB_ERRCODE pgsqlClose( SQLBASEAREAP pArea ) { if ( pArea->pResult ) + { PQclear( (PGresult *) pArea->pResult ); + pArea->pResult = NULL; + } return HB_SUCCESS; }