10000 bpo-32604: Fix memory leaks in the new _xxsubinterpreters module. by ericsnowcurrently · Pull Request #5507 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-32604: Fix memory leaks in the new _xxsubinterpreters module. #5507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Free the data when we are done with it.
  • Loading branch information
ericsnowcurrently committed Feb 3, 2018
commit 8ca3c9691db0a4412c9480cc72722958d3d2af66
3 changes: 2 additions & 1 deletion Modules/_xxsubinterpretersmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,7 @@ _channel_recv(_channels *channels, int64_t id)
return NULL;
}
_PyCrossInterpreterData_Release(data);
PyMem_Free(data);

return obj;
}
Expand All @@ -1281,7 +1282,7 @@ _channel_drop(_channels *channels, int64_t id, int send, int recv)
// Past this point we are responsible for releasing the mutex.

// Close one or both of the two ends.
int res =_channel_close_interpreter(chan, interp->id, send-recv);
int res = _channel_close_interpreter(chan, interp->id, send-recv);
PyThread_release_lock(mutex);
return res;
}
Expand Down
0