]> git.ipfire.org Git - thirdparty/asterisk.git/commit
main/rtp_engine: Fix DTLS double-free introduced by 0b6410c4f8 02/302/1
authorMatt Jordan <mjordan@digium.com>
Wed, 29 Apr 2015 21:15:43 +0000 (16:15 -0500)
committerMatt Jordan <mjordan@digium.com>
Wed, 29 Apr 2015 21:36:24 +0000 (16:36 -0500)
commit28fd06bdcd2bf7fef2c6d7aa8bd80b4f5ffc1633
tree3c0e17c8dae1b6a66415982875ca3c27337f7279
parent32cab650200aebd3b523a35fbe37619bb4721dfb
main/rtp_engine: Fix DTLS double-free introduced by 0b6410c4f8

The patch in 0b6410c4f8 did correctly fix a memory leak of the DTLS
structures in the RTP engine. However, when a 'core reload' is issued, a
double free of the memory pointed to by the char *'s in the DTLS
configuration struct can occur, as ast_rtp_dtls_cfg_free does not set
the pointers to NULL when they are freed.

This patch sets those pointers to NULL, preventing a second call to
ast_rtp_dtls_cfg_free from corrupting memory.

ASTERISK-25022

Change-Id: I820471e6070a37e3c26f760118c86770e12f6115
main/rtp_engine.c