From c116c3785172ee78c1dba485c7cddc5346c634a3 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Wed, 1 Aug 2018 14:10:09 -0300 Subject: [PATCH] freeswitch-stable: fix memory leak in mod_event_multicast Applied a patch, submitted upstream at https://freeswitch.org/jira/browse/FS-11193 that fixes two memory leaks in mod_event_multicast.c Signed-off-by: Eneas U de Queiroz --- net/freeswitch-stable/Makefile | 2 +- ...x-memory-leak-in-mod_event_multicast.patch | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 net/freeswitch-stable/patches/300-fix-memory-leak-in-mod_event_multicast.patch diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 72ffb37..77cccc8 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PRG_NAME:=freeswitch PKG_NAME:=$(PRG_NAME)-stable PKG_VERSION:=1.8.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:=Sebastian Kemper PKG_SOURCE_PROTO:=git diff --git a/net/freeswitch-stable/patches/300-fix-memory-leak-in-mod_event_multicast.patch b/net/freeswitch-stable/patches/300-fix-memory-leak-in-mod_event_multicast.patch new file mode 100644 index 0000000..dacfb59 --- /dev/null +++ b/net/freeswitch-stable/patches/300-fix-memory-leak-in-mod_event_multicast.patch @@ -0,0 +1,37 @@ +From ae56352cfff570f1b7ac0748aa339bd7bf373794 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Sat, 9 Jun 2018 19:02:41 -0300 +Subject: [PATCH] mod_event_multicast.c: fix memory leak + +Fixed two memory leaks with openssl 1.1. + +Signed-off-by: Eneas U de Queiroz +--- + src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c b/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c +index f591855a3e..fb952ce740 100644 +--- a/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c ++++ b/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c +@@ -324,7 +324,7 @@ static void event_handler(switch_event_t *event) + &tmplen, (unsigned char *) MAGIC, (int) strlen((char *) MAGIC)); + outlen += tmplen; + EVP_EncryptFinal(ctx, (unsigned char *) buf + SWITCH_UUID_FORMATTED_LENGTH + outlen, &tmplen); +- EVP_CIPHER_CTX_cleanup(ctx); ++ EVP_CIPHER_CTX_free(ctx); + #else + EVP_CIPHER_CTX_init(&ctx); + EVP_EncryptInit(&ctx, EVP_bf_cbc(), NULL, NULL); +@@ -570,7 +570,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_event_multicast_runtime) + EVP_DecryptInit(ctx, NULL, (unsigned char *) globals.psk, (unsigned char *) uuid_str); + EVP_DecryptUpdate(ctx, (unsigned char *) tmp, &outl, (unsigned char *) packet, (int) len); + EVP_DecryptFinal(ctx, (unsigned char *) tmp + outl, &tmplen); +- EVP_CIPHER_CTX_cleanup(ctx); ++ EVP_CIPHER_CTX_free(ctx); + #else + EVP_CIPHER_CTX_init(&ctx); + EVP_DecryptInit(&ctx, EVP_bf_cbc(), NULL, NULL); +-- +2.16.4 + -- 2.30.2