Skip to content

Commit

Permalink
Fix memory leak
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
henkelmax committed Mar 25, 2023
1 parent e4b5960 commit a3c0ab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/src/lame/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub unsafe extern "C" fn Java_de_maxhenkel_lame4j_Mp3Encoder_createEncoder(mut e
let i = lame_init_params(lame);

if i < 0 {
drop(lame);
lame_close(lame);
throw_io_exception(&mut env, format!("Failed to initialize LAME: {}", i));
return 0;
}
Expand Down

0 comments on commit a3c0ab8

Please sign in to comment.