]> git.ipfire.org Git - thirdparty/asterisk.git/commit
RAII: Change order or variables in clang version
authorDiederik de Groot <dkgroot@talon.nl>
Sat, 5 Jan 2019 17:14:26 +0000 (18:14 +0100)
committerDiederik de Groot <dkgroot@talon.nl>
Wed, 9 Jan 2019 01:34:27 +0000 (20:34 -0500)
commitd2c182b6ab63b8c39597f657ff7168c7d3424c8c
tree62549aa4ac3e7f3e270df497da0ef22acee61521
parent701cd2ee5849af87bb2f5bc45ce6c5bf3391e902
RAII: Change order or variables in clang version

This prevents use-after-scope issues when unwinding the stack,
which happens in reverse order. The varname variable needs to
remain alive for the destruction to be able to access it.
Issue was found using clang + address-sanitizer.

ASTERISK-28232 #close

Change-Id: I00811c34ae910836a5fb6d22304528aef92624db
include/asterisk/utils.h