Fix Coverity defects
[platform/core/security/drm-service-core-tizen.git] / tadcore / TADCInterface / TADC_IF.cpp
index 2095ef7..7784ca1 100644 (file)
@@ -448,7 +448,10 @@ int TADC_IF_VerifyCertChain(unsigned char *rica, int ricaLen,
        _scoped_x509_store_ctx(pstStoreCtx, X509_STORE_CTX_free);
 
        //init
-       X509_STORE_CTX_init(pstStoreCtx, pstStore, pstX509, untrustedCerts);
+       if(!X509_STORE_CTX_init(pstStoreCtx, pstStore, pstX509, untrustedCerts)) {
+               DRM_TAPPS_EXCEPTION("509_STORE_CTX_init error!");
+               return -1;
+    }
 
        //Set Flag
        X509_STORE_CTX_set_flags(pstStoreCtx, X509_V_FLAG_CB_ISSUER_CHECK);