From 5dee652820b055c8dcddb56f101584ae1474c20c Mon Sep 17 00:00:00 2001 From: "chleun.moon" Date: Mon, 11 Sep 2017 10:15:47 +0900 Subject: [WGID-253397, 253398] Fix unreachable code Change-Id: Ie3faef9d95d95cbcfbd222d92f25e6eae8e41581 Signed-off-by: Cheoleun Moon --- vpn/plugins/ipsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vpn/plugins/ipsec.c b/vpn/plugins/ipsec.c index 6862fbcc..7a2675e0 100644 --- a/vpn/plugins/ipsec.c +++ b/vpn/plugins/ipsec.c @@ -267,7 +267,7 @@ static int read_der_file(const char *path, X509 **cert) } *cert = d2i_X509_fp(fp, NULL); - if (!fp) { + if (!(*cert)) { connman_error("Failed to read der file"); err = -EINVAL; } @@ -295,7 +295,7 @@ static int read_pem_file(const char *path, X509 **cert) } *cert = PEM_read_X509(fp, cert, NULL, NULL); - if (!fp) { + if (!(*cert)) { connman_error("Failed to read pem file"); err = -EINVAL; } -- cgit v1.2.3