diff options
author | zuul <zuul@gerrit.asterisk.org> | 2017-02-28 19:30:20 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-02-28 19:30:20 -0600 |
commit | 848e211e1c5f88619ddb659ec7c2b18bca332518 (patch) | |
tree | bcaa951c58758eb1dfcc76e52c8065dd32248c5e | |
parent | c36cab846895b7db917ebdb09389cd1edb685ccd (diff) | |
parent | fa8f6c2fc419fdcb9ddc72f42259145d99663211 (diff) |
Merge "res_config_pgsql: Release table locks where appropriate" into 13
-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 efb733c88..40d1a37e1 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -768,6 +768,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; } @@ -913,6 +914,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; } @@ -1357,6 +1359,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; } |