[Asterisk-code-review] res pjsip endpoint identifier ip: Fix memory leak of hosts w... (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Thu Jan 26 07:59:31 CST 2017
Joshua Colp has uploaded a new change for review. ( https://gerrit.asterisk.org/4832 )
Change subject: res_pjsip_endpoint_identifier_ip: Fix memory leak of hosts when resolving.
......................................................................
res_pjsip_endpoint_identifier_ip: Fix memory leak of hosts when resolving.
This change adds a missing unreference of the hostname when resolving.
ASTERISK-26735
Change-Id: Ic012ebaf3d89e714eec340b7b0c5e63c66af857a
---
M res/res_pjsip_endpoint_identifier_ip.c
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/32/4832/1
diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c
index 116e2d8..0bd43a9 100644
--- a/res/res_pjsip_endpoint_identifier_ip.c
+++ b/res/res_pjsip_endpoint_identifier_ip.c
@@ -323,8 +323,11 @@
} 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);
return -1;
}
+
+ ao2_ref(current_string, -1);
}
ao2_ref(identify->hosts, -1);
--
To view, visit https://gerrit.asterisk.org/4832
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic012ebaf3d89e714eec340b7b0c5e63c66af857a
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list