summaryrefslogtreecommitdiff
path: root/vpn
diff options
context:
space:
mode:
authorchleun.moon <chleun.moon@samsung.com>2017-05-26 04:11:06 (GMT)
committercheoleun moon <chleun.moon@samsung.com>2017-05-30 01:20:34 (GMT)
commitdf41b6c50c74d2310a51e5cdeb3defcecbc5a7c7 (patch)
tree923dffd18fa1a7541fb4db1210b9ecd00cabcf15 /vpn
parentefda17ea48df86866d517a506a6a99604bd98082 (diff)
downloadconnman-df41b6c50c74d2310a51e5cdeb3defcecbc5a7c7.zip
connman-df41b6c50c74d2310a51e5cdeb3defcecbc5a7c7.tar.gz
connman-df41b6c50c74d2310a51e5cdeb3defcecbc5a7c7.tar.bz2
Fix reference before null check (WGID 227715)refs/changes/41/131241/2
Change-Id: Iefe9af8c8a05877a16ed71cadf23aaed7053fa9a Signed-off-by: cheoleun <chleun.moon@samsung.com>
Diffstat (limited to 'vpn')
-rw-r--r--vpn/plugins/vici-client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vpn/plugins/vici-client.c b/vpn/plugins/vici-client.c
index c312fed..5eb16ff 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;