[asterisk-commits] res config sqlite3: Fix crash when loading with invalid config (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Feb 19 13:24:45 CST 2017
Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/4959 )
Change subject: res_config_sqlite3: Fix crash when loading with invalid config
......................................................................
res_config_sqlite3: Fix crash when loading with invalid config
When ast_config_load() fails with CONFIG_STATUS_FILEINVALID, it has
already destroyed the ast_config struct for us. Trying to do it again
results in a crash.
Change-Id: If6a5c0ca718ad428e01a1fb25beb209a9ac18bc6
---
M res/res_config_sqlite3.c
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
George Joseph: Looks good to me, approved
Richard Mudgett: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
diff --git a/res/res_config_sqlite3.c b/res/res_config_sqlite3.c
index b5c70ec..f2a6b00 100644
--- a/res/res_config_sqlite3.c
+++ b/res/res_config_sqlite3.c
@@ -1125,6 +1125,8 @@
if (config == CONFIG_STATUS_FILEMISSING || config == CONFIG_STATUS_FILEINVALID) {
ast_log(LOG_ERROR, "%s config file '%s'\n",
config == CONFIG_STATUS_FILEMISSING ? "Missing" : "Invalid", config_filename);
+ ast_mutex_unlock(&config_lock);
+ return 0;
} else {
const char *cat;
struct realtime_sqlite3_db *db;
--
To view, visit https://gerrit.asterisk.org/4959
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If6a5c0ca718ad428e01a1fb25beb209a9ac18bc6
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list