diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2014-01-26 10:55:43 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-01-26 10:55:43 +0100 |
commit | 0cfc825e11ba935d84c51e2d206d3e7ee242b9fb (patch) | |
tree | fc31d9fb821d49976ad431246212e706b3ce73de | |
parent | a282237ae518bb782f1e92e3a8044be431421cfd (diff) |
huawei: fix leaked 'GUdevDevice'
-rw-r--r-- | plugins/huawei/mm-broadband-modem-huawei.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c index 695b9274..7063b8f7 100644 --- a/plugins/huawei/mm-broadband-modem-huawei.c +++ b/plugins/huawei/mm-broadband-modem-huawei.c @@ -2126,13 +2126,15 @@ huawei_modem_create_bearer (MMIfaceModem *self, client, "net", mm_port_get_device (port))); - if (g_udev_device_get_property_as_boolean (net_port, "ID_MM_HUAWEI_NDISDUP_SUPPORTED")) { + if (net_port && g_udev_device_get_property_as_boolean (net_port, "ID_MM_HUAWEI_NDISDUP_SUPPORTED")) { mm_dbg ("This device (%s) can support ndisdup feature", mm_port_get_device (port)); ctx->self->priv->ndisdup_support = FEATURE_SUPPORTED; } else { mm_dbg ("This device (%s) can not support ndisdup feature", mm_port_get_device (port)); ctx->self->priv->ndisdup_support = FEATURE_NOT_SUPPORTED; } + if (net_port) + g_object_unref (net_port); g_object_unref (client); } |