Commits

Serhiy Storchaka committed bdf0455 Merge

Call PyErr_NoMemory() when PyMem_Malloc() fails.

  • Participants
  • Parent commits b66f810, b57b4e3

Comments (0)

Files changed (1)

File Modules/_tkinter.c

             const char *e = s + size;
             PyErr_Clear();
             q = buf = (char *)PyMem_Malloc(size);
-            if (buf == NULL)
+            if (buf == NULL) {
+                PyErr_NoMemory();
                 return NULL;
+            }
             while (s != e) {
                 if (s + 1 != e && s[0] == '\xc0' && s[1] == '\x80') {
                     *q++ = '\0';