summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-device-olpc-mesh.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-glib/nm-device-olpc-mesh.c')
-rw-r--r--libnm-glib/nm-device-olpc-mesh.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libnm-glib/nm-device-olpc-mesh.c b/libnm-glib/nm-device-olpc-mesh.c
index 96e1c36196..9d14aa0b63 100644
--- a/libnm-glib/nm-device-olpc-mesh.c
+++ b/libnm-glib/nm-device-olpc-mesh.c
@@ -227,14 +227,8 @@ dispose (GObject *object)
{
NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (object);
- if (priv->companion) {
- g_object_unref (priv->companion);
- priv->companion = NULL;
- }
- if (priv->proxy) {
- g_object_unref (priv->proxy);
- priv->proxy = NULL;
- }
+ g_clear_object (&priv->companion);
+ g_clear_object (&priv->proxy);
G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->dispose (object);
}