diff options
author | George Joseph <george.joseph@fairview5.com> | 2015-06-03 12:17:58 -0600 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2015-06-03 13:25:29 -0500 |
commit | d355ee7ff3cfe1737d80da874ea93eee340cdf6f (patch) | |
tree | ffdb5ff567626d417cff67374a40d55965c7bb3e /res/res_pjsip/location.c | |
parent | 6d8dc9bb5c8db6d25a7bb1ca0ca7b35d673dd829 (diff) |
res_pjsip/location: Fix ref leak in contact_apply_handler
contact_apply_handler calls ast_res_pjsip_find_or_create_contact_status
to force the creation of a contact_status object whenever a new
contact is added but it didn't unref the returned object.
Added an ao2_cleanup(status) to plug the leak.
ASTERISK-25141
Change-Id: Icc1401cae142855a1abc86ab5179dfb3ee861c40
Reported-by: Corey Farrell
Diffstat (limited to 'res/res_pjsip/location.c')
-rw-r--r-- | res/res_pjsip/location.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c index 9e75929d7..37f39ba30 100644 --- a/res/res_pjsip/location.c +++ b/res/res_pjsip/location.c @@ -889,6 +889,7 @@ static int contact_apply_handler(const struct ast_sorcery *sorcery, void *object struct ast_sip_contact *contact = object; status = ast_res_pjsip_find_or_create_contact_status(contact); + ao2_cleanup(status); return status ? 0 : -1; } |