diff options
author | zuul <zuul@gerrit.asterisk.org> | 2017-01-26 22:11:37 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-01-26 22:11:37 -0600 |
commit | 08bc42201d9b3d9f9c402d2dc9ae3c3de961ff89 (patch) | |
tree | b72f971f4b7b80289be30ba43505eb9924a0e7ec | |
parent | 10631bb209ff4edd7f0c0ff203e4c846059d899c (diff) | |
parent | 7fa3de7ae9146f5267f45feb9fbf1c523bcaf7d4 (diff) |
Merge "res_pjsip_endpoint_identifier_ip: Fix memory leak of hosts when resolving."
-rw-r--r-- | res/res_pjsip_endpoint_identifier_ip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c index 116e2d8d7..86a5afbdb 100644 --- a/res/res_pjsip_endpoint_identifier_ip.c +++ b/res/res_pjsip_endpoint_identifier_ip.c @@ -323,9 +323,14 @@ static int ip_identify_apply(const struct ast_sorcery *sorcery, void *obj) } else if (results == -1) { ast_log(LOG_ERROR, "An error occurred when adding resolution results of '%s' on '%s'\n", current_string, ast_sorcery_object_get_id(obj)); + ao2_ref(current_string, -1); + ao2_iterator_destroy(&i); return -1; } + + ao2_ref(current_string, -1); } + ao2_iterator_destroy(&i); ao2_ref(identify->hosts, -1); identify->hosts = NULL; |