bpo-1635741: Fix potential refleaks in binascii module by shihai1991 · Pull Request #18613 · python/cpython · GitHub

github.com

Tin mới

shihai1991:bpo_1635741_binascii_1

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Fix potential refleaks in binascii module

codecov Bot commented Feb 23, 2020 • edited Loading Uh oh! There was an error while loading. Please reload this page.

codecov Bot commented Feb 23, 2020 • edited Loading Uh oh! There was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/python/cpython/blob/master/Objects/moduleobject.c#L399

What's the reason? the malloc operation of md_state will be called after first calling binascii_traverse. https://github.com/python/cpython/blob/master/Objects/moduleobject.c#L399.

using the var name module to replace m

Use get_binascii_state instead of PyModule_GetState #26069

Py_Finalize() doesn't clear all Python objects at exit #44470