[asterisk-commits] dvossel: branch 1.6.1 r229098 - /branches/1.6.1/res/res_config_pgsql.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 10 09:36:14 CST 2009
Author: dvossel
Date: Tue Nov 10 09:36:10 2009
New Revision: 229098
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=229098
Log:
reverting changes made by r229095 as they are not applicable to 1.6.1
Modified:
branches/1.6.1/res/res_config_pgsql.c
Modified: branches/1.6.1/res/res_config_pgsql.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/res/res_config_pgsql.c?view=diff&rev=229098&r1=229097&r2=229098
==============================================================================
--- branches/1.6.1/res/res_config_pgsql.c (original)
+++ branches/1.6.1/res/res_config_pgsql.c Tue Nov 10 09:36:10 2009
@@ -667,6 +667,7 @@
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 @@
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);
More information about the asterisk-commits
mailing list