Fix adopt function the same way as in upstream

Related: RHEL-36185
This commit is contained in:
Tomas Halman 2024-05-20 13:31:49 +02:00
parent 9e3147f023
commit 0dfe0b59ce
2 changed files with 11 additions and 7 deletions

View File

@ -33,16 +33,16 @@ diff -up xmlsec1-1.2.25/src/c14n.c.orig xmlsec1-1.2.25/src/c14n.c
diff -up xmlsec1-1.2.25/src/gcrypt/asymkeys.c.orig xmlsec1-1.2.25/src/gcrypt/asymkeys.c diff -up xmlsec1-1.2.25/src/gcrypt/asymkeys.c.orig xmlsec1-1.2.25/src/gcrypt/asymkeys.c
--- xmlsec1-1.2.25/src/gcrypt/asymkeys.c.orig 2017-09-12 15:21:09.000000000 +0200 --- xmlsec1-1.2.25/src/gcrypt/asymkeys.c.orig 2017-09-12 15:21:09.000000000 +0200
+++ xmlsec1-1.2.25/src/gcrypt/asymkeys.c 2024-05-14 09:55:35.801202265 +0200 +++ xmlsec1-1.2.25/src/gcrypt/asymkeys.c 2024-05-14 09:55:35.801202265 +0200
@@ -190,6 +190,9 @@ done: @@ -186,6 +186,9 @@ xmlSecGCryptAsymKeyDataAdoptKey(xmlSecKe
gcry_sexp_release(priv_key); pub_key = NULL; /* data owns it now */
} priv_key = NULL; /* data owns it now */
+ /* Adopt functions assume ownership thus the caller would expect this to be released */ + /* Adopt functions assume ownership thus the caller would expect this to be released */
+ gcry_sexp_release(key_pair); + gcry_sexp_release(key_pair);
+ +
/* done */ /* success */
return(res); res = 0;
}
diff -up xmlsec1-1.2.25/src/parser.c.orig xmlsec1-1.2.25/src/parser.c diff -up xmlsec1-1.2.25/src/parser.c.orig xmlsec1-1.2.25/src/parser.c
--- xmlsec1-1.2.25/src/parser.c.orig 2017-09-12 15:21:09.000000000 +0200 --- xmlsec1-1.2.25/src/parser.c.orig 2017-09-12 15:21:09.000000000 +0200
+++ xmlsec1-1.2.25/src/parser.c 2024-05-14 09:55:35.802202264 +0200 +++ xmlsec1-1.2.25/src/parser.c 2024-05-14 09:55:35.802202264 +0200

View File

@ -1,7 +1,7 @@
Summary: Library providing support for "XML Signature" and "XML Encryption" standards Summary: Library providing support for "XML Signature" and "XML Encryption" standards
Name: xmlsec1 Name: xmlsec1
Version: 1.2.25 Version: 1.2.25
Release: 6%{?dist}%{?extra_release} Release: 7%{?dist}%{?extra_release}
License: MIT License: MIT
Source0: http://www.aleksey.com/xmlsec/download/xmlsec1-%{version}.tar.gz Source0: http://www.aleksey.com/xmlsec/download/xmlsec1-%{version}.tar.gz
URL: http://www.aleksey.com/xmlsec/ URL: http://www.aleksey.com/xmlsec/
@ -180,6 +180,10 @@ mv %{buildroot}%{_docdir}/xmlsec1/* __tmp_doc
%{_libdir}/pkgconfig/xmlsec1-nss.pc %{_libdir}/pkgconfig/xmlsec1-nss.pc
%changelog %changelog
* Mon May 20 2024 Tomas Halman <thalman@redhat.com> - 1.2.25-7
- Fix adopt function the same way as in upstream
Related: RHEL-36185
* Fri May 17 2024 Tomas Halman <thalman@redhat.com> - 1.2.25-6 * Fri May 17 2024 Tomas Halman <thalman@redhat.com> - 1.2.25-6
- Add xmlsec1-gnutls dependency on xmlsec1-gcrypt - Add xmlsec1-gnutls dependency on xmlsec1-gcrypt
Related: RHEL-36185 Related: RHEL-36185