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
certified/1.8.6
Tilghman Lesher 16 years ago
parent ade79c6671
commit 0807833f8d

@ -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 */

Loading…
Cancel
Save