diff options
author | Jaehyun Kim <jeik01.kim@samsung.com> | 2021-06-10 18:20:00 +0900 |
---|---|---|
committer | Jaehyun Kim <jeik01.kim@samsung.com> | 2021-06-10 18:20:00 +0900 |
commit | fd0692ba60b03da85aa02aa5eb642600013f7c7b (patch) | |
tree | 6bc357ca186526b21b8d6a764a2c1706ef28a1f4 /vpn/plugins | |
parent | 713f1f6ae0d7dd1c702f20e96d43220e2c86c998 (diff) | |
download | connman-fd0692ba60b03da85aa02aa5eb642600013f7c7b.tar.gz connman-fd0692ba60b03da85aa02aa5eb642600013f7c7b.tar.bz2 connman-fd0692ba60b03da85aa02aa5eb642600013f7c7b.zip |
Fix memory leaks and dereference without null checksubmit/tizen/20210615.081101accepted/tizen/unified/20210616.132525
Change-Id: I7accd1386302c26e5bdfa8aee224fe60defc50af
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
Diffstat (limited to 'vpn/plugins')
-rwxr-xr-x | vpn/plugins/openvpn.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vpn/plugins/openvpn.c b/vpn/plugins/openvpn.c index 9e8ccebf..ef0bf782 100755 --- a/vpn/plugins/openvpn.c +++ b/vpn/plugins/openvpn.c @@ -152,8 +152,15 @@ static struct nameserver_entry *ov_append_dns_entries(const char *key, options[2]) { entry = g_try_new(struct nameserver_entry, 1); +#if defined TIZEN_EXT + if (!entry) { + g_strfreev(options); + return NULL; + } +#else if (!entry) return NULL; +#endif entry->nameserver = g_strdup(options[2]); entry->id = atoi(key + 15); /* foreign_option_XXX */ |