[Asterisk-code-review] pbx.c: On error, ast_add_extension2_lockopt should always free 'data' (asterisk[13])

Sean Bright asteriskteam at digium.com
Wed Sep 30 08:30:23 CDT 2020


Hello Joshua Colp, Friendly Automation, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/15021

to look at the new patch set (#2).

Change subject: pbx.c: On error, ast_add_extension2_lockopt should always free 'data'
......................................................................

pbx.c: On error, ast_add_extension2_lockopt should always free 'data'

In the event that the desired extension already exists,
ast_add_extension2_lockopt() will free the 'data' it is passed before
returning an error, so we should not be freeing it ourselves.

Additionally, there were two places where ast_add_extension2_lockopt()
could return an error without also freeing the 'data' pointer, so we
add that.

ASTERISK-29097 #close

Change-Id: I904707aae55169feda050a5ed7c6793b53fe6eae
---
M include/asterisk/pbx.h
M main/pbx.c
M res/parking/parking_bridge_features.c
M res/res_parking.c
M res/res_pjsip_config_wizard.c
5 files changed, 17 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/21/15021/2
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15021
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I904707aae55169feda050a5ed7c6793b53fe6eae
Gerrit-Change-Number: 15021
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200930/2cad11cd/attachment.html>


More information about the asterisk-code-review mailing list