Mercurial > cpython-lru_cache-weakref
diff Modules/_ctypes/cfield.c @ 37034:fff4eecdef45 legacy-trunk
Fix a leak that would happen under error conditions (found by Coverty).
| author | Thomas Heller <theller@ctypes.org> |
|---|---|
| date | Thu, 16 Mar 2006 20:02:36 +0000 |
| parents | 3bf23061d86c |
| children | d860311f8a97 |
line wrap: on
line diff
--- a/Modules/_ctypes/cfield.c Thu Mar 16 19:56:24 2006 +0000 +++ b/Modules/_ctypes/cfield.c Thu Mar 16 20:02:36 2006 +0000 @@ -1317,6 +1317,7 @@ if (-1 == PyUnicode_AsWideChar((PyUnicodeObject *)value, buffer, PyUnicode_GET_SIZE(value))) { Py_DECREF(value); + Py_DECREF(keep); return NULL; } Py_DECREF(value);
