Skip to content

Commit 1f131d1

Browse files
committed
fix memory leaks in tests; cleanup files
1 parent fe27730 commit 1f131d1

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/tests/data/test_crypto_refresh/v6_skesk_eax

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/tests/data/test_crypto_refresh/v6_skesk_eax.asc.pgp

Whitespace-only changes.

src/tests/ffi-enc.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,14 +768,14 @@ TEST_F(rnp_tests, test_ffi_decrypt_v6_skesk_test_vectors)
768768

769769
assert_rnp_success(
770770
rnp_input_from_path(&input, "data/test_crypto_refresh/v6_skesk_eax.asc"));
771-
assert_rnp_success(rnp_output_to_null(&output));
772771
assert_rnp_success(rnp_output_to_path(&output, "decrypted"));
773772
assert_rnp_success(rnp_op_verify_create(&verify, ffi, input, output));
774773
assert_rnp_success(rnp_op_verify_execute(verify));
775774
assert_string_equal(file_to_str("decrypted").c_str(), "Hello, world!");
776775
assert_int_equal(unlink("decrypted"), 0);
777776
rnp_input_destroy(input);
778777
rnp_output_destroy(output);
778+
rnp_op_verify_destroy(verify);
779779

780780
assert_rnp_success(
781781
rnp_input_from_path(&input, "data/test_crypto_refresh/v6_skesk_ocb.asc"));
@@ -786,6 +786,7 @@ TEST_F(rnp_tests, test_ffi_decrypt_v6_skesk_test_vectors)
786786
assert_int_equal(unlink("decrypted"), 0);
787787
rnp_input_destroy(input);
788788
rnp_output_destroy(output);
789+
rnp_op_verify_destroy(verify);
789790

790791
rnp_ffi_destroy(ffi);
791792
}
@@ -818,6 +819,7 @@ TEST_F(rnp_tests, test_ffi_v6_skesk_enc_dec)
818819
assert_rnp_success(rnp_op_encrypt_execute(enc));
819820
rnp_input_destroy(input);
820821
rnp_output_destroy(output);
822+
rnp_op_encrypt_destroy(enc);
821823

822824
assert_rnp_success(rnp_ffi_set_pass_provider(
823825
ffi, ffi_string_password_provider, (void *) "password"));
@@ -829,6 +831,7 @@ TEST_F(rnp_tests, test_ffi_v6_skesk_enc_dec)
829831
assert_string_equal(file_to_str("decrypted").c_str(), plaintext);
830832
rnp_input_destroy(input);
831833
rnp_output_destroy(output);
834+
rnp_op_verify_destroy(verify);
832835

833836
assert_int_equal(unlink("decrypted"), 0);
834837
assert_int_equal(unlink("encrypted"), 0);

0 commit comments

Comments
 (0)