res_fax: Fix reference leak caused by gateway sessions
authorCorey Farrell <git@cfware.com>
Tue, 14 Oct 2014 16:47:02 +0000 (16:47 +0000)
committerCorey Farrell <git@cfware.com>
Tue, 14 Oct 2014 16:47:02 +0000 (16:47 +0000)
commitfbb19db0c83e6f9d1e7c557dc60adfa7cdf84e25
treebafe0221f8dc1100454d30c0e306340ec89600c8
parentc61b66e1073f0cfdb97fd6788a6aacd8de6b9381
res_fax: Fix reference leak caused by gateway sessions

Fax gateway session objects can be re-used, causing the
same gateway session to be added to faxregistry.container
more than once.  This change causes fax_session_new to
remove the reserved session from the container before
it's id is changed, ensuring it's possible for the
session to be freed.

ASTERISK-24392 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4049/
........

Merged revisions 425457 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 425458 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425459 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_fax.c