]> 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:33:48 +0000 (20:33 -0500)
commit790626ec82134ca91132fc60fe8eabe5e38a0260
tree3f5cfd0aa22cc54684114e6056f9ff7bacdba922
parentd309f1d9f786f35a9c9eab736f81db96f4856292
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