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:
Tilghman Lesher 2010-06-08 06:57:24 +00:00
parent 8872926df7
commit 523e4e50bf
1 changed files with 2 additions and 0 deletions

View File

@ -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_free(errstr);
free_table(tblptr);
AST_RWLIST_UNLOCK(&sqlite_tables);
return NULL;
}
ast_mutex_unlock(&mutex);
if (AST_LIST_EMPTY(&(tblptr->columns))) {
free_table(tblptr);
AST_RWLIST_UNLOCK(&sqlite_tables);
return NULL;
}