]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx.c: On error, ast_add_extension2_lockopt should always free 'data'
authorSean Bright <sean.bright@gmail.com>
Tue, 29 Sep 2020 18:04:48 +0000 (14:04 -0400)
committerGeorge Joseph <gjoseph@digium.com>
Fri, 2 Oct 2020 17:57:22 +0000 (12:57 -0500)
commit5a0b19a4f37a22a5cb6ccb76c631a91eb5e823fe
tree02da16e3a1dd7a31b9bbfffbe0e195dfc36b5ff7
parent4a049ad51055430dc84f2217a7ca240f92f791e7
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
include/asterisk/pbx.h
main/pbx.c
res/parking/parking_bridge_features.c
res/res_parking.c
res/res_pjsip_config_wizard.c