summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/bluetooth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index e1d4b599..24f3aa52 100755
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -723,7 +723,7 @@ static bool tethering_create(const char *path,
struct connman_technology *technology, const char *bridge,
bool enabled)
{
- struct tethering_info *tethering = g_new0(struct tethering_info, 1);
+ struct tethering_info *tethering;
GDBusProxy *proxy;
const char *method;
bool result;
@@ -737,6 +737,8 @@ static bool tethering_create(const char *path,
if (!proxy)
return false;
+ tethering = g_new0(struct tethering_info, 1);
+
tethering->technology = technology;
tethering->bridge = g_strdup(bridge);
tethering->enable = enabled;