func_odbc: Add missing unlock's to acf_odbc_read.

Change-Id: I828329ecbd252ae8f27a369a046d2b03102b07c6
This commit is contained in:
Corey Farrell 2018-01-03 20:07:44 -05:00
parent 7f4facc5e4
commit e3c9314a2e
1 changed files with 2 additions and 0 deletions

View File

@ -791,6 +791,7 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
if (!(resultset = ast_calloc(1, sizeof(*resultset)))) {
pbx_builtin_setvar_helper(chan, "ODBCROWS", rowcount);
pbx_builtin_setvar_helper(chan, "ODBCSTATUS", status);
AST_RWLIST_UNLOCK(&queries);
ast_autoservice_stop(chan);
return -1;
}
@ -807,6 +808,7 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
if (!(resultset = ast_calloc(1, sizeof(*resultset)))) {
pbx_builtin_setvar_helper(chan, "ODBCROWS", rowcount);
pbx_builtin_setvar_helper(chan, "ODBCSTATUS", status);
AST_RWLIST_UNLOCK(&queries);
ast_autoservice_stop(chan);
return -1;
}