mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 07:00:13 +01:00
connectivity: fix crash when the uri gets cleared from configuration
host_and_port_from_uri() crashes if the new uri is NULL.
Fixes: 2cec94bacc
https://bugzilla.redhat.com/show_bug.cgi?id=1634500
This commit is contained in:
parent
b595232021
commit
871cd6128d
1 changed files with 2 additions and 1 deletions
|
|
@ -892,7 +892,8 @@ update_config (NMConnectivity *self, NMConfigData *config_data)
|
|||
|
||||
g_clear_pointer (&priv->host, g_free);
|
||||
g_clear_pointer (&priv->port, g_free);
|
||||
host_and_port_from_uri (uri, &priv->host, &priv->port);
|
||||
if (uri)
|
||||
host_and_port_from_uri (uri, &priv->host, &priv->port);
|
||||
}
|
||||
|
||||
/* Set the interval. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue