Potential Memory Leak
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 42/100
Research direction
Start by reading src/constants.c and comparing its PyNumber_And failure path with the attached patch. Confirm that allocated objects are disposed of on that failure and that the error cleanup paths are handled consistently; completion is a leak-free routine on those error paths.
Written by the indexing model from the issue text.
Description
In src/constants.c, if the PyNumber_And call fails, the routine returns without disposing of allocated objects.
Enclosed is a patch that fixes this, while regularizing the handling of cleanup on errors in an easier-to-understand, more structured fashion, avoiding gotos. Even with explicitly spelling out PyErr_Occurred() calls everywhere, the code is still slightly shorter.
But I think a C extension library requires too much work for this kind of thing. A more complete binding for Fontconfig can be done in pure Python with much less code.
- Dominant language
- Python
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·