From: Joshua Colp Date: Wed, 18 Dec 2013 11:58:44 +0000 (+0000) Subject: res_calendar: Protect channel when adding datastore. X-Git-Tag: 1.8.26.0-rc1~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a289473f1c25e3531f611a630fb328de408aabe;p=thirdparty%2Fasterisk.git res_calendar: Protect channel when adding datastore. This change adds a missing channel lock when adding a datastore to a channel. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@404135 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_calendar.c b/res/res_calendar.c index 7c8518b85a..6e509d7347 100644 --- a/res/res_calendar.c +++ b/res/res_calendar.c @@ -725,7 +725,10 @@ static void *do_notify(void *data) datastore->inheritance = DATASTORE_INHERIT_FOREVER; ao2_ref(event, +1); + + ast_channel_lock(chan); res = ast_channel_datastore_add(chan, datastore); + ast_channel_unlock(chan); if (!(apptext = ast_str_create(32))) { goto notify_cleanup;