chan_ooh323: call ast_rtp_instance_stop on ooh323_destroy
authorAlexander Anikin <may213@yandex.ru>
Mon, 7 Sep 2015 18:19:41 +0000 (22:19 +0400)
committerAlexander Anikin <may213@yandex.ru>
Mon, 7 Sep 2015 18:48:08 +0000 (13:48 -0500)
    Call ast_rtp_instance_stop on ooh323_destroy to free resources
    allocated by rtp instance

    ASTERISK-25299 #close
    Report by: Alexandr Dranchuk

Change-Id: I455096bd7da016b871afe90af86067c2c7c9f33f

addons/chan_ooh323.c

index 58db56f..aa9cbaf 100644 (file)
@@ -4115,6 +4115,7 @@ int ooh323_destroy(struct ooh323_pvt *p)
                }
 
                if (cur->rtp) {
                }
 
                if (cur->rtp) {
+                       ast_rtp_instance_stop(cur->rtp);
                        ast_rtp_instance_destroy(cur->rtp);
                        cur->rtp = NULL;
                }
                        ast_rtp_instance_destroy(cur->rtp);
                        cur->rtp = NULL;
                }