mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
Merge branch 'fix/socket-use-after-close' into 'master'
gsocket: Fix use-after-close See merge request GNOME/glib!1845
This commit is contained in:
commit
b777b4caaa
@ -3790,6 +3790,9 @@ update_select_events (GSocket *socket)
|
||||
GList *l;
|
||||
WSAEVENT event;
|
||||
|
||||
if (socket->priv->closed)
|
||||
return;
|
||||
|
||||
ensure_event (socket);
|
||||
|
||||
event_mask = 0;
|
||||
@ -3848,7 +3851,8 @@ update_condition_unlocked (GSocket *socket)
|
||||
WSANETWORKEVENTS events;
|
||||
GIOCondition condition;
|
||||
|
||||
if (WSAEnumNetworkEvents (socket->priv->fd,
|
||||
if (!socket->priv->closed &&
|
||||
WSAEnumNetworkEvents (socket->priv->fd,
|
||||
socket->priv->event,
|
||||
&events) == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user