res_pjsip_session: Fix memory leak of direct media format capabilities
[asterisk/asterisk.git] / res / res_pjsip_session.c
index 4dae4b4..f44ec44 100644 (file)
@@ -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);