Skip to content

Commit

Permalink
[3.12] gh-105673: Fix uninitialized warning in sysmodule.c (GH-105674) (
Browse files Browse the repository at this point in the history
#105675)

In sys_add_xoption(), 'value' may be uninitialized for some error paths.
(cherry picked from commit a8d69fe)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
  • Loading branch information
miss-islington and sobolevn authored Jun 12, 2023
1 parent d310fc7 commit 0b305e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/sysmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3371,7 +3371,7 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict)
static int
sys_add_xoption(PyObject *opts, const wchar_t *s)
{
PyObject *name, *value;
PyObject *name, *value = NULL;

const wchar_t *name_end = wcschr(s, L'=');
if (!name_end) {
Expand Down

0 comments on commit 0b305e8

Please sign in to comment.