From: Walter Doekes Date: Wed, 1 Oct 2014 09:52:13 +0000 (+0000) Subject: chan_sip: Remove excess ref of realtime peer before sip_poke_peer. X-Git-Tag: 11.14.0-rc1~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a819ae6b8a7f679ad1d683c8bd887f3b5d5d7b82;p=thirdparty%2Fasterisk.git chan_sip: Remove excess ref of realtime peer before sip_poke_peer. The peer is referenced at the end of sip_poke_peer, it should not get an extra ref before the call to sip_poke_peer. This fixes a memory leak. ASTERISK-22945 #close Reported by: ibercom Tested by: Yuriy Gorlichenko Patches: asterisk11.patch uploaded by ibercom (License #6599) Review: https://reviewboard.asterisk.org/r/4031/ ........ Merged revisions 424176 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@424177 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 668eeec297..3d4a674655 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -31209,7 +31209,6 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str /* Startup regular pokes */ if (!devstate_only && enablepoke) { - sip_ref_peer(peer, "schedule qualify"); sip_poke_peer(peer, 0); } }