mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 11:12:11 +01:00
gnetworkmonitornetlink: Don't check if a passed-in GError ** is NULL
This is not a correct way to check if `g_socket_new_from_fd()` failed. Instead just see if it returned `NULL` itself. This was preventing the netlink monitor from being initialised. Closes #1518
This commit is contained in:
parent
96e8e03a57
commit
2cc2663434
@ -113,7 +113,7 @@ g_network_monitor_netlink_initable_init (GInitable *initable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
nl->priv->sock = g_socket_new_from_fd (sockfd, error);
|
nl->priv->sock = g_socket_new_from_fd (sockfd, error);
|
||||||
if (error)
|
if (!nl->priv->sock)
|
||||||
{
|
{
|
||||||
g_prefix_error (error, "%s", _("Could not create network monitor: "));
|
g_prefix_error (error, "%s", _("Could not create network monitor: "));
|
||||||
(void) g_close (sockfd, NULL);
|
(void) g_close (sockfd, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user