]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
[mod_event_multicast] Fix memory leak 45/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Wed, 9 Oct 2019 17:10:26 +0000 (19:10 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sat, 12 Oct 2019 19:43:14 +0000 (21:43 +0200)
commitfc41980f19d1471cf86a150cbaa841fe86c16dd2
treedadcd6596c28151176ba9743a7b9cc753ac31ac0
parent6f8d65c348760c94f8966181ae55df144aad5550
[mod_event_multicast] Fix memory leak

Taken from FS-11193:

In "event_handler()" function, when encrypting data using openssl 1.1.0,
the context ctx is allocated by "EVP_CIPHER_CTX_new()", then data is
encrypted, and at the end, EVP_CIPHER_CTX_cleanup is called. This
function resets the context (the function itself is deprecated, and has
been renamed to "EVP_CIPHER_CTX_reset) so that it can be used again. The
correct call would be to "EVP_CIPHER_CTX_free()", which frees the
memory. The code for openssl 1.0 is OK, since the "ctx" struct is kept
in stack.  The same thing happens during decryption. "ctx" is allocated,
but never freed.

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c