diff options
author | taesub kim <taesub.kim@samsung.com> | 2016-06-12 19:19:17 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2016-06-12 19:19:17 -0700 |
commit | ba4685e28396ee6713aee92bf1c58f2ab104f08a (patch) | |
tree | b597f1d81f7953c0e7ed961e6dfdd2d23f9eab71 | |
parent | ce2e892c7acf909461f8cff41e813218e92e0bca (diff) | |
parent | 4a71625eba90f2199e11915bbd39fc214396f926 (diff) | |
download | connman-ba4685e28396ee6713aee92bf1c58f2ab104f08a.tar.gz connman-ba4685e28396ee6713aee92bf1c58f2ab104f08a.tar.bz2 connman-ba4685e28396ee6713aee92bf1c58f2ab104f08a.zip |
Merge "[upstream] Fix memory leak when realloc fails." into tizen
-rwxr-xr-x | src/inet.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; |