vector: multiple evaluation of elem in AST_VECTOR_ADD_SORTED.
authorCorey Farrell <git@cfware.com>
Thu, 5 Oct 2017 22:59:06 +0000 (18:59 -0400)
committerCorey Farrell <git@cfware.com>
Fri, 6 Oct 2017 18:38:58 +0000 (14:38 -0400)
commit3bd00c4a7eeb9da143b5f7ff1ec12bdfcc2c5af7
tree9c1aae13293ecfceeaaa442d48c8ca1353b7dd4d
parent3ef6834c3b6fb9cb73164dcc56a10820026a63c5
vector: multiple evaluation of elem in AST_VECTOR_ADD_SORTED.

Use temporary variable to prevent multiple evaluations of elem argument.
This resolves a memory leak in res_pjproject startup.

ASTERISK-27317 #close

Change-Id: Ib960d7f5576f9e1a3c478ecb48995582a574e06d
include/asterisk/vector.h
tests/test_vector.c