diff options
author | Kjartan Maraas <kmaraas@gnome.org> | 2011-03-15 00:08:58 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-03-15 00:08:58 -0500 |
commit | b224ab8e568ab741c78cd03aedab526bbc9c0cd4 (patch) | |
tree | 0bc43ec52a8774411d4cc5ab816abce76f870441 /libnm-glib/nm-device-ethernet.c | |
parent | 925f21f7c27a17d055888104ee954b813c6f53e2 (diff) | |
download | NetworkManager-b224ab8e568ab741c78cd03aedab526bbc9c0cd4.tar.gz |
trivial: let g_free and g_strdup handle NULL (bgo #644763)
Diffstat (limited to 'libnm-glib/nm-device-ethernet.c')
-rw-r--r-- | libnm-glib/nm-device-ethernet.c | 7 |
1 files changed, 2 insertions, 5 deletions
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); } |