summaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2012-12-19 14:29:15 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-12-20 13:06:59 (GMT)
commit13d88ea3301c9d333159d9eef486509b6a0836f3 (patch)
treed0af6ce31b62ba9622d7e245d22aea1da2999c5c /src/inet.c
parenta691bf284be676807545d2d4e9c000a0fcf35cce (diff)
downloadconnman-13d88ea3301c9d333159d9eef486509b6a0836f3.zip
connman-13d88ea3301c9d333159d9eef486509b6a0836f3.tar.gz
connman-13d88ea3301c9d333159d9eef486509b6a0836f3.tar.bz2
core: Use glib memory functions
Use for all memory allocation/dealocation operation the glib functions. This allows us to use g_mem_profile().
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inet.c b/src/inet.c
index 23b02a2..a36642a 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -234,7 +234,7 @@ char *connman_inet_ifname(int index)
if (err < 0)
return NULL;
- return strdup(ifr.ifr_name);
+ return g_strdup(ifr.ifr_name);
}
short int connman_inet_ifflags(int index)
@@ -2280,7 +2280,7 @@ char **__connman_inet_get_running_interfaces(void)
result[count++] = g_strdup(r->ifr_name);
}
- free(ifr);
+ g_free(ifr);
if (count < numif)
result = g_try_realloc(result, (count + 1) * sizeof(char *));
@@ -2289,7 +2289,7 @@ char **__connman_inet_get_running_interfaces(void)
error:
close(sk);
- free(ifr);
+ g_free(ifr);
return NULL;
}