[WGID-253397, 253398] Fix unreachable code 85/148785/1 accepted/tizen/4.0/unified/20170913.003055 submit/tizen_4.0/20170911.130433
authorchleun.moon <chleun.moon@samsung.com>
Mon, 11 Sep 2017 01:15:47 +0000 (10:15 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Mon, 11 Sep 2017 01:16:04 +0000 (10:16 +0900)
Change-Id: Ie3faef9d95d95cbcfbd222d92f25e6eae8e41581
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
vpn/plugins/ipsec.c

index 6862fbc..7a2675e 100644 (file)
@@ -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;
        }