diff options
Diffstat (limited to 'res/res_config_pgsql.c')
-rw-r--r-- | res/res_config_pgsql.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index 8eae03f5a..02c76fcfe 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -461,7 +461,6 @@ static struct ast_variable *realtime_pgsql(const char *database, const char *tab ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); return NULL; } @@ -476,13 +475,11 @@ static struct ast_variable *realtime_pgsql(const char *database, const char *tab ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); return NULL; } ast_str_append(&sql, 0, " AND %s%s '%s'", newparam, op, ast_str_buffer(escapebuf)); } - va_end(ap); /* We now have our complete statement; Lets connect to the server and execute it. */ ast_mutex_lock(&pgsql_lock); @@ -598,7 +595,6 @@ static struct ast_config *realtime_multi_pgsql(const char *database, const char ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); ast_config_destroy(cfg); return NULL; } @@ -614,7 +610,6 @@ static struct ast_config *realtime_multi_pgsql(const char *database, const char ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); ast_config_destroy(cfg); return NULL; } @@ -626,7 +621,6 @@ static struct ast_config *realtime_multi_pgsql(const char *database, const char ast_str_append(&sql, 0, " ORDER BY %s", initfield); } - va_end(ap); /* We now have our complete statement; Lets connect to the server and execute it. */ ast_mutex_lock(&pgsql_lock); @@ -761,7 +755,6 @@ static int update_pgsql(const char *database, const char *tablename, const char ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); release_table(table); return -1; } @@ -778,20 +771,17 @@ static int update_pgsql(const char *database, const char *tablename, const char ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); release_table(table); return -1; } ast_str_append(&sql, 0, ", %s = '%s'", newparam, ast_str_buffer(escapebuf)); } - va_end(ap); release_table(table); ESCAPE_STRING(escapebuf, lookup); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", lookup); - va_end(ap); return -1; } @@ -1007,7 +997,6 @@ static int store_pgsql(const char *database, const char *table, va_list ap) ESCAPE_STRING(buf, newval); ast_str_append(&sql2, 0, ", '%s'", ast_str_buffer(buf)); } - va_end(ap); ast_str_append(&sql1, 0, "%s)", ast_str_buffer(sql2)); ast_debug(1, "PostgreSQL RealTime: Insert SQL: %s\n", ast_str_buffer(sql1)); @@ -1089,7 +1078,6 @@ static int destroy_pgsql(const char *database, const char *table, const char *ke ESCAPE_STRING(buf2, newval); ast_str_append(&sql, 0, " AND %s = '%s'", ast_str_buffer(buf1), ast_str_buffer(buf2)); } - va_end(ap); ast_debug(1, "PostgreSQL RealTime: Delete SQL: %s\n", ast_str_buffer(sql)); |