mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
[3.13] gh-122334: Fix crash when importing ssl after re-initialization (GH-122481) (#122614)
gh-122334: Fix crash when importing ssl after re-initialization (GH-122481)
* Fix crash when importing ssl after re-initialization
(cherry picked from commit 9fc1c992d6
)
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
This commit is contained in:
parent
c1efeb3234
commit
b20893b5c2
3 changed files with 33 additions and 0 deletions
|
@ -2004,6 +2004,19 @@ parser_clear(struct _PyArg_Parser *parser)
|
|||
if (parser->is_kwtuple_owned) {
|
||||
Py_CLEAR(parser->kwtuple);
|
||||
}
|
||||
|
||||
if (parser->format) {
|
||||
parser->fname = NULL;
|
||||
}
|
||||
else {
|
||||
assert(parser->fname != NULL);
|
||||
}
|
||||
parser->custom_msg = NULL;
|
||||
parser->pos = 0;
|
||||
parser->min = 0;
|
||||
parser->max = 0;
|
||||
parser->is_kwtuple_owned = 0;
|
||||
parser->once.v = 0;
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue