diff options
-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; |