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; }