Release list lock before returning on error.
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 8 Jun 2010 06:57:24 +0000 (06:57 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 8 Jun 2010 06:57:24 +0000 (06:57 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268933 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_config_sqlite.c

index 3956410..ef1e180 100644 (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;
        }