[Asterisk-code-review] Geolocation: chan_pjsip Capability Preview (asterisk[16])

George Joseph asteriskteam at digium.com
Thu Jul 7 13:41:40 CDT 2022


Attention is currently required from: Stanislav Abramenkov, Kevin Harwell.
George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18697 )

Change subject: Geolocation:  chan_pjsip Capability Preview
......................................................................


Patch Set 2:

(4 comments)

File res/res_pjsip_geolocation.c:

https://gerrit.asterisk.org/c/asterisk/+/18697/comment/256de839_7d0c01f8 
PS1, Line 300: 	geoloc_hdr_value = ast_alloca(geoloc_hdr->hvalue.slen + 1);
             : 	ast_copy_pj_str(geoloc_hdr_value, &geoloc_hdr->hvalue, geoloc_hdr->hvalue.slen + 1);
             : 	duped_geoloc_hdr_value = ast_strdupa(geoloc_hdr_value);
> geoloc_hdr_value contains a local copy that appears unused, so I think you can just use that directl […]
Done


https://gerrit.asterisk.org/c/asterisk/+/18697/comment/8ac36008_ad4ca0b5 
PS1, Line 381: 		rc = ast_geoloc_datastore_add_eprofile(ds, eprofile);
             : 		if (rc <= 0) {
             : 			SCOPE_EXIT_LOG_RTN_VALUE(0, LOG_WARNING,
             : 				"%s: Couldn't add eprofile '%s' to datastore\n", session_name,
             : 				eprofile->id);
             : 		}
             : 		eprofile = NULL;
> I think this causes a ref leak on eprofile. […]
Done


https://gerrit.asterisk.org/c/asterisk/+/18697/comment/d3ab36f4_a2a07391 
PS1, Line 491: 	SCOPE_EXIT_RTN_VALUE(0, "%s: PIDF-LO added with cid '%s'\n", session_name, base_cid);
> base_cid is leaked here.
Done


https://gerrit.asterisk.org/c/asterisk/+/18697/comment/94ccac16_50b40774 
PS1, Line 612: 		struct ast_geoloc_eprofile *ep = ast_geoloc_datastore_get_eprofile(tempds, i);
> ep is ref leaked on each loop.
Done



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18697
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ie2e2bcd87243c2cfabc43eb823d4427c7086f4d9
Gerrit-Change-Number: 18697
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Stanislav Abramenkov <stas.abramenkov at gmail.com>
Gerrit-Attention: Stanislav Abramenkov <stas.abramenkov at gmail.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Thu, 07 Jul 2022 18:41:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220707/5ecc62f9/attachment.html>


More information about the asterisk-code-review mailing list