From 90d2345b7b74a2a07be4b2401c122af84efca14b Mon Sep 17 00:00:00 2001 From: Sergio Garcia Murillo Date: Sun, 29 Aug 2021 12:56:59 +0200 Subject: [PATCH] fix mem leak on deallocating recv sessions --- test/srtp_driver.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/srtp_driver.c b/test/srtp_driver.c index 79efc13b3..7e0dfe26b 100644 --- a/test/srtp_driver.c +++ b/test/srtp_driver.c @@ -2107,14 +2107,14 @@ srtp_err_status_t srtp_validate_cryptex() if (srtp_octet_string_is_eq(packet, reference, len)) { return srtp_err_status_fail; } - } - status = srtp_dealloc(srtp_snd); - if (status) { - return status; + status = srtp_dealloc(srtp_recv); + if (status) { + return status; + } } - status = srtp_dealloc(srtp_recv); + status = srtp_dealloc(srtp_snd); if (status) { return status; } @@ -2584,14 +2584,14 @@ srtp_err_status_t srtp_validate_gcm_cryptex() if (srtp_octet_string_is_eq(packet, reference, len)) { return srtp_err_status_fail; } - } - status = srtp_dealloc(srtp_snd); - if (status) { - return status; + status = srtp_dealloc(srtp_recv); + if (status) { + return status; + } } - status = srtp_dealloc(srtp_recv); + status = srtp_dealloc(srtp_snd); if (status) { return status; }