25 lines
884 B
Diff
25 lines
884 B
Diff
From ee1a87bc489f14681dacd3fdc518dd40bbab81ea Mon Sep 17 00:00:00 2001
|
|
From: Charalampos Stratakis <cstratak@redhat.com>
|
|
Date: Fri, 12 Dec 2025 19:54:48 +0100
|
|
Subject: [PATCH] Initialize interned_fields to NULL
|
|
|
|
This avoids a code path where Py_XDECREF could be used on
|
|
interned_fields when uninitialized.
|
|
---
|
|
src/c/_cffi_backend.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/c/_cffi_backend.c b/src/c/_cffi_backend.c
|
|
index 835e3318..6087e635 100644
|
|
--- a/src/c/_cffi_backend.c
|
|
+++ b/src/c/_cffi_backend.c
|
|
@@ -5152,7 +5152,7 @@ static PyObject *b_complete_struct_or_union_lock_held(CTypeDescrObject *ct,
|
|
Py_ssize_t byteoffsetorg;
|
|
CFieldObject **previous;
|
|
int prev_bitfield_size, prev_bitfield_free;
|
|
- PyObject *interned_fields;
|
|
+ PyObject *interned_fields = NULL;
|
|
|
|
sflags = complete_sflags(sflags);
|
|
if (sflags & SF_PACKED)
|