Potential Memory Leak
まだ誰も着手していません。
評価
調査の方向性
まず src/constants.c を読み、PyNumber_And の失敗パスと添付パッチを比較します。この失敗時に割り当てられたオブジェクトが破棄されること、およびエラーのクリーンアップパスが一貫して処理されることを確認します。これらのエラーパスでルーチンにリークがなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 2
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stephrobert/dsoxlab#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sublimehq/package_control#1780 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nwg-piotr/nwg-displays#145 ·