Skip to content

Commit 65bae5b

Browse files
committed
fix ASAN complaints
Signed-off-by: Stephan Mueller <smueller@chronox.de>
1 parent 71d82f0 commit 65bae5b

File tree

2 files changed

+15
-36
lines changed

2 files changed

+15
-36
lines changed

apps/src/sbvarsign.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,9 @@ int main(int argc, char **argv)
642642
CKINT((add_auth_descriptor(&ws->parsed_opts, ctx, include_attrs)));
643643

644644
out:
645+
if (ctx->var_name)
646+
free(ctx->var_name);
647+
pkcs7_clean_opts(&ws->parsed_opts);
645648
LC_RELEASE_MEM(ws);
646649
PKCS7_FREE
647650
return -ret;

apps/tests/meson.build

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -817,29 +817,23 @@ if (host_machine.system() != 'windows' and
817817
sbvarsign_test_script,
818818
args: [ 'ML-DSA87',
819819
lc_x509_generator.full_path(),
820-
sbvarsign.full_path(),
821-
sbverify.full_path(),
822-
efi_test_file
820+
sbvarsign.full_path()
823821
],
824822
timeout: 300, suite: regression,
825823
should_fail: fips140_negative_expect_fail)
826824
test('Secure boot sbvarsign tool ML-DSA65',
827825
sbvarsign_test_script,
828826
args: [ 'ML-DSA65',
829827
lc_x509_generator.full_path(),
830-
sbvarsign.full_path(),
831-
sbverify.full_path(),
832-
efi_test_file
828+
sbvarsign.full_path()
833829
],
834830
timeout: 300, suite: regression,
835831
should_fail: fips140_negative_expect_fail)
836832
test('Secure boot sbvarsign tool ML-DSA44',
837833
sbvarsign_test_script,
838834
args: [ 'ML-DSA44',
839835
lc_x509_generator.full_path(),
840-
sbvarsign.full_path(),
841-
sbverify.full_path(),
842-
efi_test_file
836+
sbvarsign.full_path()
843837
],
844838
timeout: 300, suite: regression,
845839
should_fail: fips140_negative_expect_fail)
@@ -848,29 +842,23 @@ if (host_machine.system() != 'windows' and
848842
sbvarsign_test_script,
849843
args: [ 'ML-DSA87-ED448',
850844
lc_x509_generator.full_path(),
851-
sbvarsign.full_path(),
852-
sbverify.full_path(),
853-
efi_test_file
845+
sbvarsign.full_path()
854846
],
855847
timeout: 300, suite: regression,
856848
should_fail: fips140_negative_expect_fail)
857849
test('Secure boot sbvarsign tool ML-DSA65-ED25519',
858850
sbvarsign_test_script,
859851
args: [ 'ML-DSA65-ED25519',
860852
lc_x509_generator.full_path(),
861-
sbvarsign.full_path(),
862-
sbverify.full_path(),
863-
efi_test_file
853+
sbvarsign.full_path()
864854
],
865855
timeout: 300, suite: regression,
866856
should_fail: fips140_negative_expect_fail)
867857
test('Secure boot sbvarsign tool ML-DSA44-ED25519',
868858
sbvarsign_test_script,
869859
args: [ 'ML-DSA44-ED25519',
870860
lc_x509_generator.full_path(),
871-
sbvarsign.full_path(),
872-
sbverify.full_path(),
873-
efi_test_file
861+
sbvarsign.full_path()
874862
],
875863
timeout: 300, suite: regression,
876864
should_fail: fips140_negative_expect_fail)
@@ -879,59 +867,47 @@ if (host_machine.system() != 'windows' and
879867
sbvarsign_test_script,
880868
args: [ 'SLH-DSA-SHAKE-128F',
881869
lc_x509_generator.full_path(),
882-
sbvarsign.full_path(),
883-
sbverify.full_path(),
884-
efi_test_file
870+
sbvarsign.full_path()
885871
],
886872
timeout: 300, suite: regression,
887873
should_fail: fips140_negative_expect_fail)
888874
test('Secure boot sbvarsign tool SLH-DSA-SHAKE-128S',
889875
sbvarsign_test_script,
890876
args: [ 'SLH-DSA-SHAKE-128S',
891877
lc_x509_generator.full_path(),
892-
sbvarsign.full_path(),
893-
sbverify.full_path(),
894-
efi_test_file
878+
sbvarsign.full_path()
895879
],
896880
timeout: 300, suite: regression,
897881
should_fail: fips140_negative_expect_fail)
898882
test('Secure boot sbvarsign tool SLH-DSA-SHAKE-192F',
899883
sbvarsign_test_script,
900884
args: [ 'SLH-DSA-SHAKE-192F',
901885
lc_x509_generator.full_path(),
902-
sbvarsign.full_path(),
903-
sbverify.full_path(),
904-
efi_test_file
886+
sbvarsign.full_path()
905887
],
906888
timeout: 300, suite: regression,
907889
should_fail: fips140_negative_expect_fail)
908890
test('Secure boot sbvarsign tool SLH-DSA-SHAKE-192S',
909891
sbvarsign_test_script,
910892
args: [ 'SLH-DSA-SHAKE-192S',
911893
lc_x509_generator.full_path(),
912-
sbvarsign.full_path(),
913-
sbverify.full_path(),
914-
efi_test_file
894+
sbvarsign.full_path()
915895
],
916896
timeout: 300, suite: regression,
917897
should_fail: fips140_negative_expect_fail)
918898
test('Secure boot sbvarsign tool SLH-DSA-SHAKE-256F',
919899
sbvarsign_test_script,
920900
args: [ 'SLH-DSA-SHAKE-256F',
921901
lc_x509_generator.full_path(),
922-
sbvarsign.full_path(),
923-
sbverify.full_path(),
924-
efi_test_file
902+
sbvarsign.full_path()
925903
],
926904
timeout: 300, suite: regression,
927905
should_fail: fips140_negative_expect_fail)
928906
test('Secure boot sbvarsign tool SLH-DSA-SHAKE-256S',
929907
sbvarsign_test_script,
930908
args: [ 'SLH-DSA-SHAKE-256S',
931909
lc_x509_generator.full_path(),
932-
sbvarsign.full_path(),
933-
sbverify.full_path(),
934-
efi_test_file
910+
sbvarsign.full_path()
935911
],
936912
timeout: 300, suite: regression,
937913
should_fail: fips140_negative_expect_fail)

0 commit comments

Comments
 (0)