bpo-35984: _xxsubinterpreters: Fix memory leak in _channel_send() (GH-11845)

https://bugs.python.org/issue35984
This commit is contained in:
Alexey Izbyshev 2019-02-16 01:28:58 +03:00 committed by Miss Islington (bot)
parent 4327705cfa
commit 36433221f0
1 changed files with 1 additions and 0 deletions

View File

@ -1339,6 +1339,7 @@ _channel_send(_channels *channels, int64_t id, PyObject *obj)
return -1;
}
if (_PyObject_GetCrossInterpreterData(obj, data) != 0) {
PyMem_Free(data);
PyThread_release_lock(mutex);
return -1;
}