gh-105673: Fix uninitialized warning in sysmodule.c (#105674)

In sys_add_xoption(), 'value' may be uninitialized for some error paths.
This commit is contained in:
Nikita Sobolev 2023-06-12 11:47:56 +03:00 committed by GitHub
parent 58f5227d7c
commit a8d69fe92c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3375,7 +3375,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) {