tools: console: check if console was shutdown in callbacks
On error in main thread virConsoleShutdown is called which deletes fd watches/stream callback and yet callbacks can be called after. Thus we can incorrectly allocate terminalToStream.data memory and get memory leak for example. Let's check if console was shutdown in the very beginning of callbacks. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Showing
想要评论请 注册 或 登录