mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
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/trunk@268454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1222,7 +1222,9 @@ static void session_destructor(void *obj)
|
||||
if (session->f != NULL) {
|
||||
fclose(session->f);
|
||||
}
|
||||
ast_atomic_fetchadd_int(&eqe->usecount, -1);
|
||||
if (eqe) {
|
||||
ast_atomic_fetchadd_int(&eqe->usecount, -1);
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief Allocate manager session structure and add it to the list of sessions */
|
||||
|
||||
Reference in New Issue
Block a user