summaryrefslogtreecommitdiff
path: root/libnm-glib
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-glib')
-rw-r--r--libnm-glib/nm-access-point.c3
-rw-r--r--libnm-glib/nm-device-ethernet.c7
-rw-r--r--libnm-glib/nm-device-wifi.c7
-rw-r--r--libnm-glib/nm-vpn-connection.c4
4 files changed, 6 insertions, 15 deletions
diff --git a/libnm-glib/nm-access-point.c b/libnm-glib/nm-access-point.c
index e57f078670..2712f36ce1 100644
--- a/libnm-glib/nm-access-point.c
+++ b/libnm-glib/nm-access-point.c
@@ -508,8 +508,7 @@ finalize (GObject *object)
if (priv->ssid)
g_byte_array_free (priv->ssid, TRUE);
- if (priv->bssid)
- g_free (priv->bssid);
+ g_free (priv->bssid);
G_OBJECT_CLASS (nm_access_point_parent_class)->finalize (object);
}
diff --git a/libnm-glib/nm-device-ethernet.c b/libnm-glib/nm-device-ethernet.c
index 6584a3f96c..932c6bda3f 100644
--- a/libnm-glib/nm-device-ethernet.c
+++ b/libnm-glib/nm-device-ethernet.c
@@ -322,11 +322,8 @@ finalize (GObject *object)
{
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (object);
- if (priv->hw_address)
- g_free (priv->hw_address);
-
- if (priv->perm_hw_address)
- g_free (priv->perm_hw_address);
+ g_free (priv->hw_address);
+ g_free (priv->perm_hw_address);
G_OBJECT_CLASS (nm_device_ethernet_parent_class)->finalize (object);
}
diff --git a/libnm-glib/nm-device-wifi.c b/libnm-glib/nm-device-wifi.c
index c0a366dd93..621c22f183 100644
--- a/libnm-glib/nm-device-wifi.c
+++ b/libnm-glib/nm-device-wifi.c
@@ -763,11 +763,8 @@ finalize (GObject *object)
{
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (object);
- if (priv->hw_address)
- g_free (priv->hw_address);
-
- if (priv->perm_hw_address)
- g_free (priv->perm_hw_address);
+ g_free (priv->hw_address);
+ g_free (priv->perm_hw_address);
G_OBJECT_CLASS (nm_device_wifi_parent_class)->finalize (object);
}
diff --git a/libnm-glib/nm-vpn-connection.c b/libnm-glib/nm-vpn-connection.c
index c803f120bf..dd219b2a14 100644
--- a/libnm-glib/nm-vpn-connection.c
+++ b/libnm-glib/nm-vpn-connection.c
@@ -186,9 +186,7 @@ finalize (GObject *object)
{
NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (object);
- if (priv->banner)
- g_free (priv->banner);
-
+ g_free (priv->banner);
g_object_unref (priv->proxy);
G_OBJECT_CLASS (nm_vpn_connection_parent_class)->finalize (object);