]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix memory leak in setup of dsa sig.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 6 Jun 2024 07:30:09 +0000 (09:30 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 6 Jun 2024 07:30:09 +0000 (09:30 +0200)
doc/Changelog
validator/val_secalgo.c

index 6838029e3f90d145a4d7730c9c7465fc84bf4189..4c4310418dbd3898d0f3e78c2cbe325504061011 100644 (file)
@@ -1,3 +1,6 @@
+6 June 2024: Wouter
+       - Fix memory leak in setup of dsa sig.
+
 4 June 2024: Yorgos
        - Merge #1080: AddressSanitizer detection in tdir tests and memory leak
          fixes.
index 78651674991eb30eb4b82c31110562489e6a2be9..40ebb1728d493d70d54b02f1955a8671d01c4909 100644 (file)
@@ -423,7 +423,10 @@ setup_dsa_sig(unsigned char** sig, unsigned int* len)
        if(!dsasig) return 0;
 
 #ifdef HAVE_DSA_SIG_SET0
-       if(!DSA_SIG_set0(dsasig, R, S)) return 0;
+       if(!DSA_SIG_set0(dsasig, R, S)) {
+               DSA_SIG_free(dsasig);
+               return 0;
+       }
 #else
 #  ifndef S_SPLINT_S
        dsasig->r = R;