Skip to content

Commit

Permalink
fix mem leak on deallocating recv sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
murillo128 committed Aug 29, 2021
1 parent f8a374b commit 90d2345
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/srtp_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 90d2345

Please sign in to comment.