summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaesub kim <taesub.kim@samsung.com>2016-03-09 06:28:22 (GMT)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2016-03-09 06:28:22 (GMT)
commit0bc7a0d61791cd835f86d5e41eacb50276f80faf (patch)
tree8f763083a28a326f2262f16cd8ce8f354e748fad
parent6a2a42602335d539ad18f2070534f8d8a1eedef7 (diff)
parentcf570f852323cbb268e7c035aa520015c398622a (diff)
downloadconnman-0bc7a0d61791cd835f86d5e41eacb50276f80faf.zip
connman-0bc7a0d61791cd835f86d5e41eacb50276f80faf.tar.gz
connman-0bc7a0d61791cd835f86d5e41eacb50276f80faf.tar.bz2
Merge "bluetooth: Fix Memory Leak" into tizen
-rwxr-xr-xplugins/bluetooth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index e1d4b59..24f3aa5 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;