diff options
author | chleun.moon <chleun.moon@samsung.com> | 2017-05-26 13:11:06 +0900 |
---|---|---|
committer | cheoleun moon <chleun.moon@samsung.com> | 2017-05-30 01:20:34 +0000 |
commit | df41b6c50c74d2310a51e5cdeb3defcecbc5a7c7 (patch) | |
tree | 923dffd18fa1a7541fb4db1210b9ecd00cabcf15 /vpn | |
parent | efda17ea48df86866d517a506a6a99604bd98082 (diff) | |
download | connman-df41b6c50c74d2310a51e5cdeb3defcecbc5a7c7.tar.gz connman-df41b6c50c74d2310a51e5cdeb3defcecbc5a7c7.tar.bz2 connman-df41b6c50c74d2310a51e5cdeb3defcecbc5a7c7.zip |
Fix reference before null check (WGID 227715)
Change-Id: Iefe9af8c8a05877a16ed71cadf23aaed7053fa9a
Signed-off-by: cheoleun <chleun.moon@samsung.com>
Diffstat (limited to 'vpn')
-rw-r--r-- | vpn/plugins/vici-client.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vpn/plugins/vici-client.c b/vpn/plugins/vici-client.c index c312fede..5eb16ff1 100644 --- a/vpn/plugins/vici-client.c +++ b/vpn/plugins/vici-client.c @@ -268,6 +268,11 @@ static char *load_cert_from_path(const char *path) char *file_buff = NULL; fp = fopen(path, "rb"); + if (fp == NULL) { + connman_error("fopen failed"); + return NULL; + } + fd = fileno(fp); fstat(fd, &st); file_size = st.st_size; |