Skip to content

Commit 712261b

Browse files
committed
fix memory leaks in tests; cleanup files
1 parent 1dab85b commit 712261b

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

-8
This file was deleted.

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

Whitespace-only changes.

src/tests/ffi-enc.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -842,14 +842,14 @@ TEST_F(rnp_tests, test_ffi_decrypt_v6_skesk_test_vectors)
842842

843843
assert_rnp_success(
844844
rnp_input_from_path(&input, "data/test_crypto_refresh/v6_skesk_eax.asc"));
845-
assert_rnp_success(rnp_output_to_null(&output));
846845
assert_rnp_success(rnp_output_to_path(&output, "decrypted"));
847846
assert_rnp_success(rnp_op_verify_create(&verify, ffi, input, output));
848847
assert_rnp_success(rnp_op_verify_execute(verify));
849848
assert_string_equal(file_to_str("decrypted").c_str(), "Hello, world!");
850849
assert_int_equal(unlink("decrypted"), 0);
851850
rnp_input_destroy(input);
852851
rnp_output_destroy(output);
852+
rnp_op_verify_destroy(verify);
853853

854854
assert_rnp_success(
855855
rnp_input_from_path(&input, "data/test_crypto_refresh/v6_skesk_ocb.asc"));
@@ -860,6 +860,7 @@ TEST_F(rnp_tests, test_ffi_decrypt_v6_skesk_test_vectors)
860860
assert_int_equal(unlink("decrypted"), 0);
861861
rnp_input_destroy(input);
862862
rnp_output_destroy(output);
863+
rnp_op_verify_destroy(verify);
863864

864865
rnp_ffi_destroy(ffi);
865866
}
@@ -892,6 +893,7 @@ TEST_F(rnp_tests, test_ffi_v6_skesk_enc_dec)
892893
assert_rnp_success(rnp_op_encrypt_execute(enc));
893894
rnp_input_destroy(input);
894895
rnp_output_destroy(output);
896+
rnp_op_encrypt_destroy(enc);
895897

896898
assert_rnp_success(rnp_ffi_set_pass_provider(
897899
ffi, ffi_string_password_provider, (void *) "password"));
@@ -903,6 +905,7 @@ TEST_F(rnp_tests, test_ffi_v6_skesk_enc_dec)
903905
assert_string_equal(file_to_str("decrypted").c_str(), plaintext);
904906
rnp_input_destroy(input);
905907
rnp_output_destroy(output);
908+
rnp_op_verify_destroy(verify);
906909

907910
assert_int_equal(unlink("decrypted"), 0);
908911
assert_int_equal(unlink("encrypted"), 0);

0 commit comments

Comments
 (0)