   if (numRLEs == 0 && numDeltas == 0) {
     const int inputId = vals_id;
     const int bpId = ++vals_id;
-    nvcompConfigAddBP(&config, inputId, maxSegmentSize, bpId, type);
-
-    config.nodes[bpId].length = metadata->getNumElementsOf(bpId);
+    nvcompConfigAddBP(config.get(), inputId, maxSegmentSize, bpId, type);
+
+    config->nodes[bpId].length = metadata->getNumElementsOf(bpId);
   }
 
   return config;


struct nvcompIntHandle_t
{
  nvcompIntConfig_t* config = nullptr;
  cudaStream_t stream = 0;

  // main decomp functions

// asynchronous Assumes workspaceStorage is already allocated.
nvcompError_t nvcompCreateHandleAsync(
    nvcompHandle_t* handle,
    std::unique_ptr<nvcompIntConfig_t> config,
    void* workspaceStorage,
    const size_t workspaceBytes,
    cudaStream_t stream)
