diff options
author | George Joseph <george.joseph@fairview5.com> | 2015-01-08 21:37:42 +0000 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2015-01-08 21:37:42 +0000 |
commit | 143bec54ee134c9fcd014c3445ea64af4793f5b0 (patch) | |
tree | c88cdb504ea38594379fccdea1c7f15798e09dea | |
parent | 6e59bf649112ed371311081f91772f053eac3e94 (diff) |
res_pjsip_outbound_registration: Fix reference leak.
Every time a registration started, sip_outbound_registration_response_cb bumps
the ref count on client_state then pushes a handle_registration_response task.
handle_registration_response never unreffed it though. So every time a
registration goes out, the ref count goes up by one.
This patch adds the unreffs to handle_registration_response.
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/4303/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | res/res_pjsip_outbound_registration.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c index ad1bc7ef5..75dae1f37 100644 --- a/res/res_pjsip_outbound_registration.c +++ b/res/res_pjsip_outbound_registration.c @@ -398,7 +398,7 @@ static int handle_client_registration(void *data) pjsip_regc_info info; char server_uri[PJSIP_MAX_URL_SIZE], client_uri[PJSIP_MAX_URL_SIZE]; - cancel_registration(client_state); + ao2_ref(client_state, -1); if ((client_state->status == SIP_REGISTRATION_STOPPED) || (pjsip_regc_register(client_state->client, PJ_FALSE, &tdata) != PJ_SUCCESS)) { |