mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
Release list lock before returning on error.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -686,12 +686,14 @@ static struct sqlite_cache_tables *find_table(const char *tablename)
|
|||||||
ast_log(LOG_WARNING, "SQLite error %d: %s\n", err, errstr);
|
ast_log(LOG_WARNING, "SQLite error %d: %s\n", err, errstr);
|
||||||
ast_free(errstr);
|
ast_free(errstr);
|
||||||
free_table(tblptr);
|
free_table(tblptr);
|
||||||
|
AST_RWLIST_UNLOCK(&sqlite_tables);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ast_mutex_unlock(&mutex);
|
ast_mutex_unlock(&mutex);
|
||||||
|
|
||||||
if (AST_LIST_EMPTY(&(tblptr->columns))) {
|
if (AST_LIST_EMPTY(&(tblptr->columns))) {
|
||||||
free_table(tblptr);
|
free_table(tblptr);
|
||||||
|
AST_RWLIST_UNLOCK(&sqlite_tables);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user