]> git.ipfire.org Git - thirdparty/asterisk.git/commit
apps/app_queue: Prevent possible crash when evaluating queue penalty rules
authorMatthew Jordan <mjordan@digium.com>
Thu, 9 Apr 2015 02:03:57 +0000 (02:03 +0000)
committerMatthew Jordan <mjordan@digium.com>
Thu, 9 Apr 2015 02:03:57 +0000 (02:03 +0000)
commit6b399f72dc77f647183953f970a88730109bc311
treebafcd1176fbd4354c3e74c71a159df40a6b7bbae
parentf69e1b4a17f52a15c3e90229c8e34655d2c8d154
apps/app_queue: Prevent possible crash when evaluating queue penalty rules

Although it only occurred once, a crash occurred when a queue attempted to
evaluate a queue penalty rule that appeared to have already been destroyed.
In many locations in app_queue, a test is done to see if qe->pr is NULL;
however, when we dispose of a queue's penalty rules, we don't set the pointer
to NULL after free'ing it. This patch does that to prevent any dangling
pointers from lingering on the queue object.

Review: https://reviewboard.asterisk.org/r/4522

ASTERISK-23319 #close
Reported by: Vadim
patches:
  rb4552.patch submitted by Stefan Engström (License 6691)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@434448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_queue.c