summaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inet.c')
-rwxr-xr-xsrc/inet.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/inet.c b/src/inet.c
index bfad01cb..972fdff5 100755
--- a/src/inet.c
+++ b/src/inet.c
@@ -2706,7 +2706,14 @@ char **__connman_inet_get_running_interfaces(void)
g_free(ifr);
if (count < numif)
+ {
+ char **prev_result = result;
result = g_try_realloc(result, (count + 1) * sizeof(char *));
+ if (!result) {
+ g_free(prev_result);
+ goto error;
+ }
+ }
return result;