{"action":"created","issue":{"url":"https://api.github.com/repos/kamailio/kamailio/issues/512","repository_url":"https://api.github.com/repos/kamailio/kamailio","labels_url":"https://api.github.com/repos/kamailio/kamailio/issues/512/labels{/name}","comments_url":"https://api.github.com/repos/kamailio/kamailio/issues/512/comments","events_url":"https://api.github.com/repos/kamailio/kamailio/issues/512/events","html_url":"https://github.com/kamailio/kamailio/pull/512","id":134056392,"number":512,"title":"ims_usrloc_scscf: fix link_contact_to_impu()  -  was crashing with maxcontact_behaviour == 2","user":{"login":"dragos-oancea","id":4988814,"avatar_url":"https://avatars.githubusercontent.com/u/4988814?v=3","gravatar_id":"","url":"https://api.github.com/users/dragos-oancea","html_url":"https://github.com/dragos-oancea","followers_url":"https://api.github.com/users/dragos-oancea/followers","following_url":"https://api.github.com/users/dragos-oancea/following{/other_user}","gists_url":"https://api.github.com/users/dragos-oancea/gists{/gist_id}","starred_url":"https://api.github.com/users/dragos-oancea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragos-oancea/subscriptions","organizations_url":"https://api.github.com/users/dragos-oancea/orgs","repos_url":"https://api.github.com/users/dragos-oancea/repos","events_url":"https://api.github.com/users/dragos-oancea/events{/privacy}","received_events_url":"https://api.github.com/users/dragos-oancea/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-02-16T18:17:27Z","updated_at":"2016-03-14T11:38:48Z","closed_at":"2016-03-14T11:38:48Z","pull_request":{"url":"https://api.github.com/repos/kamailio/kamailio/pulls/512","html_url":"https://github.com/kamailio/kamailio/pull/512","diff_url":"https://github.com/kamailio/kamailio/pull/512.diff","patch_url":"https://github.com/kamailio/kamailio/pull/512.patch"},"body":"link_contact_to_impu() does not behave as intended - it will return immediately because ptr==contact .\r\nThis will lead to a crash when current contact is always different than the previous. \r\nTo prevent this, I set ptr to 0 as it points to a chunk of freed memory anyway.\r\nRemoved call to  unlink_contact_from_impu() as I believed is redundant and it leads to double free.\r\nThis is an usual scenario and it happens with devices that reconnect on TCP , and they change the src port every time , and then the contact will be different. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kamailio/kamailio/issues/comments/196273627","html_url":"https://github.com/kamailio/kamailio/pull/512#issuecomment-196273627","issue_url":"https://api.github.com/repos/kamailio/kamailio/issues/512","id":196273627,"user":{"login":"miconda","id":184809,"avatar_url":"https://avatars.githubusercontent.com/u/184809?v=3","gravatar_id":"","url":"https://api.github.com/users/miconda","html_url":"https://github.com/miconda","followers_url":"https://api.github.com/users/miconda/followers","following_url":"https://api.github.com/users/miconda/following{/other_user}","gists_url":"https://api.github.com/users/miconda/gists{/gist_id}","starred_url":"https://api.github.com/users/miconda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miconda/subscriptions","organizations_url":"https://api.github.com/users/miconda/orgs","repos_url":"https://api.github.com/users/miconda/repos","events_url":"https://api.github.com/users/miconda/events{/privacy}","received_events_url":"https://api.github.com/users/miconda/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T11:38:48Z","updated_at":"2016-03-14T11:38:48Z","body":"OK, closing it."}}