summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-06-18 08:49:15 +0200
committerThomas Haller <thaller@redhat.com>2020-08-04 23:48:16 +0200
commit6281e328752d8793033e2ce594e831c7a94bcbdb (patch)
tree54834fbe589126f12ce4d21cb76a0942115dde0d
parent45ad1c1e85bf6cbee50568428db04bba162170bd (diff)
downloadNetworkManager-6281e328752d8793033e2ce594e831c7a94bcbdb.tar.gz
cli: fix reference count handling in hotspot error path
The connection is automatically unreferenced when the function returns. Fixes: 9c5ea0917d51 ('devices: reuse the hotspot connection if we find appropriate one'): (cherry picked from commit 3ecfd13dedb1260968e07b49423017e7bf328200) (cherry picked from commit 26f1074d9dec4172933f0e9be58b9a270f6ef4b2)
-rw-r--r--clients/cli/devices.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/clients/cli/devices.c b/clients/cli/devices.c
index d5224b9301..1f8d0e4215 100644
--- a/clients/cli/devices.c
+++ b/clients/cli/devices.c
@@ -4174,7 +4174,6 @@ do_device_wifi_hotspot (const NMCCommand *cmd, NmCli *nmc, int argc, const char
g_return_if_fail (s_wsec);
if (!set_wireless_security_for_hotspot (s_wsec, wifi_mode, caps, password, show_password, &error)) {
- g_object_unref (connection);
g_string_printf (nmc->return_text, _("Error: Invalid 'password': %s."), error->message);
g_clear_error (&error);
nmc->return_value = NMC_RESULT_ERROR_UNKNOWN;