summaryrefslogtreecommitdiff
path: root/src/platform/nmp-object.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/nmp-object.c')
-rw-r--r--src/platform/nmp-object.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c
index 50e6825bf9..0ffebc9ad3 100644
--- a/src/platform/nmp-object.c
+++ b/src/platform/nmp-object.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2015 - 2017 Red Hat, Inc.
+ * Copyright (C) 2015 - 2018 Red Hat, Inc.
*/
#include "nm-default.h"
@@ -31,6 +31,9 @@
#include "nm-core-utils.h"
#include "nm-platform-utils.h"
+#include "wifi/nm-wifi-utils.h"
+#include "wpan/nm-wpan-utils.h"
+
/*****************************************************************************/
#define _NMLOG_DOMAIN LOGD_PLATFORM
@@ -456,6 +459,7 @@ _vt_cmd_obj_dispose_link (NMPObject *obj)
udev_device_unref (obj->_link.udev.device);
obj->_link.udev.device = NULL;
}
+ g_clear_object (&obj->_link.ext_data);
nmp_object_unref (obj->_link.netlink.lnk);
}
@@ -908,6 +912,12 @@ _vt_cmd_obj_copy_link (NMPObject *dst, const NMPObject *src)
nmp_object_unref (dst->_link.netlink.lnk);
dst->_link.netlink.lnk = src->_link.netlink.lnk;
}
+ if (dst->_link.ext_data != src->_link.ext_data) {
+ if (dst->_link.ext_data)
+ g_clear_object (&dst->_link.ext_data);
+ if (src->_link.ext_data)
+ dst->_link.ext_data = g_object_ref (src->_link.ext_data);
+ }
dst->_link = src->_link;
}