24 lines
809 B
Diff
24 lines
809 B
Diff
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
|