diff options
author | Joshua Colp <jcolp@digium.com> | 2017-02-28 19:37:36 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-02-28 19:37:36 -0600 |
commit | 10d12b277c347ed931a27d4380990effa3ced125 (patch) | |
tree | 89bc5b85c25ee01ec25ee68997a09fe94b170108 /res | |
parent | 063af910ebcba0d04d3d90c14d881fdd41e2f8f7 (diff) | |
parent | e5b44c26b46babd40a715b6d91aa0eaf775a0746 (diff) |
Merge "res_config_pgsql: Release table locks where appropriate"
Diffstat (limited to 'res')
-rw-r--r-- | res/res_config_pgsql.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index 93126c6a5..2d37c6b19 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -733,6 +733,7 @@ static int update_pgsql(const char *database, const char *tablename, const char ast_mutex_lock(&pgsql_lock); if (!pgsql_reconnect(database)) { ast_mutex_unlock(&pgsql_lock); + release_table(table); return -1; } @@ -878,6 +879,7 @@ static int update2_pgsql(const char *database, const char *tablename, const stru ast_mutex_lock(&pgsql_lock); if (!pgsql_reconnect(database)) { ast_mutex_unlock(&pgsql_lock); + release_table(table); return -1; } @@ -1322,6 +1324,7 @@ static int require_pgsql(const char *database, const char *tablename, va_list ap if (pgsql_exec(database, tablename, ast_str_buffer(sql), &result) != 0) { ast_mutex_unlock(&pgsql_lock); + release_table(table); return -1; } |