Merge "Add LCOV macro for coverage" into tizen
[platform/core/api/connection.git] / unittest / utc-connection-profile.c
index 28fa478..bebc587 100755 (executable)
@@ -1989,7 +1989,10 @@ int utc_connection_profile_get_cellular_auth_info_p(void)
        char *pwd = NULL;
 
        int ret = connection_profile_get_cellular_auth_info(profile_cellular, &type, &name, &pwd);
-       FREE_RESOURCE(name); FREE_RESOURCE(pwd);
+       if (ret == CONNECTION_ERROR_NONE) {
+               FREE_RESOURCE(name);
+               FREE_RESOURCE(pwd);
+       }
 
        if (telephony_supported)
                CHECK_RETURN("connection_profile_get_cellular_auth_info", ret, CONNECTION_ERROR_NONE);