res_pjsip_session: Fix memory leak of direct media format capabilities

The direct media format capabilities are always allocated in
ast_sip_session_alloc and were not freed in the session destructor. Whoops.

(This being the third whoops caught by Scott and Nitesh's valgrind work for
the Asterisk Test Suite. Nifty!)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/97/197/1
Matthew Jordan 12 years ago
parent 00e9a136bb
commit 92af2b2e26

@ -1026,6 +1026,7 @@ static void session_destructor(void *obj)
ast_party_id_free(&session->id);
ao2_cleanup(session->endpoint);
ast_format_cap_destroy(session->req_caps);
ast_format_cap_destroy(session->direct_media_cap);
if (session->dsp) {
ast_dsp_free(session->dsp);

Loading…
Cancel
Save