File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1129,6 +1129,7 @@ PyEnumValue(PyObject *self, PyObject *args)
11291129 int index ;
11301130 long rc ;
11311131 wchar_t * retValueBuf ;
1132+ wchar_t * tmpBuf ;
11321133 BYTE * retDataBuf ;
11331134 DWORD retValueSize , bufValueSize ;
11341135 DWORD retDataSize , bufDataSize ;
@@ -1161,7 +1162,6 @@ PyEnumValue(PyObject *self, PyObject *args)
11611162 }
11621163
11631164 while (1 ) {
1164- wchar_t * tmp ;
11651165 Py_BEGIN_ALLOW_THREADS
11661166 rc = RegEnumValueW (hKey ,
11671167 index ,
@@ -1177,13 +1177,13 @@ PyEnumValue(PyObject *self, PyObject *args)
11771177 break ;
11781178
11791179 bufDataSize *= 2 ;
1180- tmp = (char * )PyMem_Realloc (retDataBuf , bufDataSize );
1181- if (tmp == NULL ) {
1180+ tmpBuf = (wchar_t * )PyMem_Realloc (retDataBuf , bufDataSize );
1181+ if (tmpBuf == NULL ) {
11821182 PyErr_NoMemory ();
11831183 retVal = NULL ;
11841184 goto fail ;
11851185 }
1186- retDataBuf = tmp ;
1186+ retDataBuf = tmpBuf ;
11871187 retDataSize = bufDataSize ;
11881188 retValueSize = bufValueSize ;
11891189 }
You can’t perform that action at this time.
0 commit comments