diff options
author | chleun.moon <chleun.moon@samsung.com> | 2017-10-19 19:38:09 +0900 |
---|---|---|
committer | taesub kim <taesub.kim@samsung.com> | 2017-10-19 20:06:17 +0900 |
commit | 8cea3395fcf937ab8b31471fd647049ee873aeeb (patch) | |
tree | 849a91bad7b7dc1e55912f9ecad5e02057d827dc /vpn/plugins/vici-client.c | |
parent | b027eb75286c874fee8a8b016049d6c8e9dea39b (diff) | |
download | connman-8cea3395fcf937ab8b31471fd647049ee873aeeb.tar.gz connman-8cea3395fcf937ab8b31471fd647049ee873aeeb.tar.bz2 connman-8cea3395fcf937ab8b31471fd647049ee873aeeb.zip |
[CID-32919, 33501] Unchecked return valuesubmit/tizen_4.0/20171103.014414accepted/tizen/4.0/unified/20171106.074041
Change-Id: I561f537c292f24af2e9956a7694e3868ee0ccd32
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
Diffstat (limited to 'vpn/plugins/vici-client.c')
-rw-r--r-- | vpn/plugins/vici-client.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vpn/plugins/vici-client.c b/vpn/plugins/vici-client.c index 5fcc3c52..67e365a5 100644 --- a/vpn/plugins/vici-client.c +++ b/vpn/plugins/vici-client.c @@ -286,7 +286,12 @@ static char *load_cert_from_path(const char *path) return NULL; } - fstat(fd, &st); + if (fstat(fd, &st) != 0) { + connman_error("fstat failed"); + fclose(fp); + return NULL; + } + file_size = st.st_size; file_buff = g_try_malloc0(sizeof(char)*st.st_size); if (file_buff == NULL) { |