]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 268454 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Sat, 5 Jun 2010 17:28:23 +0000 (17:28 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sat, 5 Jun 2010 17:28:23 +0000 (17:28 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r268454 | tilghman | 2010-06-05 12:27:12 -0500 (Sat, 05 Jun 2010) | 5 lines

  Verify event is not NULL before attempting to lower its usecount.

  (closes issue #17234)
   Reported by: mav3rick
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@268455 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index ab2877556d83a1860b2c8326b1ae25208c9be9e7..1932fde9a06bdc9e5f3c744e2238d0235576db0d 100644 (file)
@@ -853,7 +853,9 @@ static void free_session(struct mansession_session *session)
                fclose(session->f);
        ast_mutex_destroy(&session->__lock);
        ast_free(session);
-       ast_atomic_fetchadd_int(&eqe->usecount, -1);
+       if (eqe) {
+               ast_atomic_fetchadd_int(&eqe->usecount, -1);
+       }
 }
 
 static void destroy_session(struct mansession_session *session)