mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 01:50:08 +01:00
dhcp: fix GBytes leak in nm_dhcp_client_start_ip4()
(cherry picked from commit 99ad9df342)
This commit is contained in:
parent
058dfebf7b
commit
79127634e5
1 changed files with 4 additions and 1 deletions
|
|
@ -413,6 +413,7 @@ nm_dhcp_client_start_ip4 (NMDhcpClient *self,
|
|||
const char *last_ip4_address)
|
||||
{
|
||||
NMDhcpClientPrivate *priv;
|
||||
gs_unref_bytes GBytes *tmp = NULL;
|
||||
|
||||
g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), FALSE);
|
||||
|
||||
|
|
@ -424,7 +425,9 @@ nm_dhcp_client_start_ip4 (NMDhcpClient *self,
|
|||
nm_log_info (LOGD_DHCP, "Activation (%s) Beginning DHCPv4 transaction (timeout in %d seconds)",
|
||||
priv->iface, priv->timeout);
|
||||
|
||||
nm_dhcp_client_set_client_id (self, dhcp_client_id ? nm_dhcp_utils_client_id_string_to_bytes (dhcp_client_id) : NULL);
|
||||
if (dhcp_client_id)
|
||||
tmp = nm_dhcp_utils_client_id_string_to_bytes (dhcp_client_id);
|
||||
nm_dhcp_client_set_client_id (self, tmp);
|
||||
|
||||
g_clear_pointer (&priv->hostname, g_free);
|
||||
priv->hostname = g_strdup (hostname);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue