Fix a memory leak
Related: RHEL-120801
This commit is contained in:
parent
c17f90c070
commit
3e43489804
23
fix-memory-leak.patch
Normal file
23
fix-memory-leak.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From b9de95a1caf39c5eee35c984fd0b51ddd1b0d40e Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Sat, 17 Jan 2026 07:21:23 +0100
|
||||
Subject: [PATCH] Add missing "noexcept" to fix a memory leak.
|
||||
|
||||
Fixes https://bugs.launchpad.net/lxml/+bug/2138421
|
||||
---
|
||||
src/lxml/etree.pyx | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lxml/etree.pyx b/src/lxml/etree.pyx
|
||||
index 2ed3d1e15..3e7dca047 100644
|
||||
--- a/src/lxml/etree.pyx
|
||||
+++ b/src/lxml/etree.pyx
|
||||
@@ -668,7 +668,7 @@ cdef class DocInfo:
|
||||
return root_name
|
||||
|
||||
@cython.final
|
||||
- cdef tree.xmlDtd* _get_c_dtd(self):
|
||||
+ cdef tree.xmlDtd* _get_c_dtd(self) noexcept:
|
||||
""""Return the DTD. Create it if it does not yet exist."""
|
||||
cdef xmlDoc* c_doc = self._doc._c_doc
|
||||
cdef xmlNode* c_root_node
|
||||
@ -18,6 +18,10 @@ URL: https://github.com/lxml/lxml
|
||||
Source0: lxml-%{version}-no-isoschematron-rng.tar.gz
|
||||
Source1: get-lxml-source.sh
|
||||
|
||||
# Fix a memory leak
|
||||
# Resolved upstream: https://github.com/lxml/lxml/commit/459d51e316c319c8f49b3b7d08fb80cbc8585f49
|
||||
Patch0: fix-memory-leak.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libxslt-devel
|
||||
|
||||
Loading…
Reference in New Issue
Block a user