]> git.ipfire.org Git - thirdparty/asterisk.git/commit
main/rtp_engine: Fix DTLS double-free introduced by 0b6410c4f8 00/300/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:25:16 +0000 (16:25 -0500)
commitd4e207e27ef4c5db85c88969b2aec999e1897ae4
tree11fe1be7499bb083a79f5fcfb8956dcda4f0f67e
parent49ef81c15c114001f727129e9cfc2a4acfe2c5fa
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