summaryrefslogtreecommitdiff
path: root/vpn/plugins/vici-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'vpn/plugins/vici-client.c')
-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;