aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-10 15:36:10 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-10 15:36:10 +0000
commit9aab01f01841fff6e5f463a237d7ffa6e4b05eea (patch)
tree739a20e90b43ca1aeef6e61517f953b792ef7807 /res
parent1f0b7f050a4a7cbe55a1488c28fdb77d5ba77d98 (diff)
reverting changes made by r229095 as they are not applicable to 1.6.1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@229098 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_config_pgsql.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c
index d51338708..4fa8f27ee 100644
--- a/res/res_config_pgsql.c
+++ b/res/res_config_pgsql.c
@@ -667,6 +667,7 @@ static int update_pgsql(const char *database, const char *tablename, const char
ast_debug(1, "PostgreSQL RealTime: Query: %s\n", sql->str);
ast_debug(1, "PostgreSQL RealTime: Query Failed because: %s\n", PQerrorMessage(pgsqlConn));
ast_mutex_unlock(&pgsql_lock);
+ ast_free(sql);
return -1;
} else {
ExecStatusType result_status = PQresultStatus(result);
@@ -679,12 +680,14 @@ static int update_pgsql(const char *database, const char *tablename, const char
ast_debug(1, "PostgreSQL RealTime: Query Failed because: %s (%s)\n",
PQresultErrorMessage(result), PQresStatus(result_status));
ast_mutex_unlock(&pgsql_lock);
+ ast_free(sql);
return -1;
}
}
numrows = atoi(PQcmdTuples(result));
ast_mutex_unlock(&pgsql_lock);
+ ast_free(sql);
ast_debug(1, "PostgreSQL RealTime: Updated %d rows on table: %s\n", numrows, tablename);