From: Corey Farrell Date: Tue, 4 Nov 2014 19:30:43 +0000 (+0000) Subject: res_http_websockets: Fix extra unref of module X-Git-Tag: 12.8.0-rc1~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19ff146888b1fda6f37562ea9bf2123382f68925;p=thirdparty%2Fasterisk.git res_http_websockets: Fix extra unref of module In websocket_add_protocol_internal is used to add the "echo" protocol, but ast_websocket_remove_protocol is used to remove it. This causes an extra call to ast_module_unref. ASTERISK-24480 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4140/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@427200 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_http_websocket.c b/res/res_http_websocket.c index 297cd6b527..29dd9315a5 100644 --- a/res/res_http_websocket.c +++ b/res/res_http_websocket.c @@ -886,7 +886,7 @@ static int load_module(void) static int unload_module(void) { - ast_websocket_remove_protocol("echo", websocket_echo_callback); + websocket_remove_protocol_internal("echo", websocket_echo_callback); ast_http_uri_unlink(&websocketuri); ao2_ref(websocketuri.data, -1); websocketuri.data = NULL;