*** mod_auth_pgsql-2.0.1/mod_auth_pgsql.c Fri Feb 21 09:24:33 2003 --- my201/mod_auth_pgsql.c Wed Oct 1 01:08:58 2003 *************** *** 553,558 **** --- 553,560 ---- apr_snprintf(pg_errstr, MAX_STRING_LEN, "mod_auth_pgsql database connection error reset failed %s", PQerrorMessage(sec->auth_pgsql_connection)); + PQfinish(sec->auth_pgsql_connection); + sec->auth_pgsql_connection = NULL; return NULL; } } *************** *** 568,578 **** --- 570,584 ---- apr_snprintf(pg_errstr, MAX_STRING_LEN, "PGSQL 2: %s -- Query: %s ", PQerrorMessage(sec->auth_pgsql_connection), query); + PQfinish(sec->auth_pgsql_connection); + sec->auth_pgsql_connection = NULL; return NULL; } if (PQresultStatus(pg_result) == PGRES_EMPTY_QUERY) { PQclear(pg_result); + PQfinish(sec->auth_pgsql_connection); + sec->auth_pgsql_connection = NULL; return NULL; } *************** *** 580,585 **** --- 586,593 ---- apr_snprintf(pg_errstr, MAX_STRING_LEN, "PGSQL 3: %s -- Query: %s", PQerrorMessage(sec->auth_pgsql_connection), query); PQclear(pg_result); + PQfinish(sec->auth_pgsql_connection); + sec->auth_pgsql_connection = NULL; return NULL; } *************** *** 589,594 **** --- 597,604 ---- apr_snprintf(pg_errstr, MAX_STRING_LEN, "PGSQL 4: %s", PQerrorMessage(sec->auth_pgsql_connection)); PQclear(pg_result); + PQfinish(sec->auth_pgsql_connection); + sec->auth_pgsql_connection = NULL; return NULL; } *************** *** 596,601 **** --- 606,613 ---- apr_snprintf(pg_errstr, MAX_STRING_LEN, "Could not get memory for Postgres query."); PQclear(pg_result); + PQfinish(sec->auth_pgsql_connection); + sec->auth_pgsql_connection = NULL; return NULL; } *************** *** 604,609 **** --- 616,623 ---- /* ignore errors here ! */ PQclear(pg_result); + PQfinish(sec->auth_pgsql_connection); + sec->auth_pgsql_connection = NULL; return result; }