]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
func_odbc: Add missing unlock's to acf_odbc_read.
authorCorey Farrell <git@cfware.com>
Thu, 4 Jan 2018 01:07:44 +0000 (20:07 -0500)
committerCorey Farrell <git@cfware.com>
Thu, 4 Jan 2018 01:31:40 +0000 (20:31 -0500)
Change-Id: I828329ecbd252ae8f27a369a046d2b03102b07c6

funcs/func_odbc.c

index ed8987ea489a3525d8f175d6747d33f3027e6056..0f6b65e7d390e06ae625eea135f3553c8296ccbb 100644 (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;
                        }