         for (auto &join_index : l_join_indices) {
             gdf_column_view(result_cols[i], nullptr, nullptr, join_size, left_cols[join_index]->dtype);
             int col_width; get_column_byte_width(result_cols[i], &col_width);
-            cudaMalloc(&(result_cols[i]->data), col_width * join_size);
-            cudaMalloc(&(result_cols[i]->valid), sizeof(gdf_valid_type)*gdf_get_num_chars_bitmask(join_size));
-            cudaMemset(result_cols[i]->valid, 0, sizeof(gdf_valid_type)*gdf_get_num_chars_bitmask(join_size));
+            CUDA_TRY( cudaMalloc(&(result_cols[i]->data), col_width * join_size) );
+            CUDA_TRY( cudaMalloc(&(result_cols[i]->valid), sizeof(gdf_valid_type)*gdf_get_num_chars_bitmask(join_size)) );
+            CUDA_TRY( cudaMemset(result_cols[i]->valid, 0, sizeof(gdf_valid_type)*gdf_get_num_chars_bitmask(join_size)) );
             ++i;
         }
     }

    using gdf_col_pointer = typename std::unique_ptr<gdf_column, std::function<void(gdf_column*)>>;
    auto gdf_col_deleter = [](gdf_column* col){
        col->size = 0;
        if (col->data) { cudaFree(col->data); }
        if (col->valid) { cudaFree(col->valid); }
    };
    gdf_col_pointer l_index_temp, r_index_temp;

        return join_err;
    }

    gdf_error df_err =
        construct_join_output_df<join_type, size_type, index_type>(
            ljoincol, rjoincol,
            left_cols, num_left_cols, left_join_cols,
            right_cols, num_right_cols, right_join_cols,
            num_cols_to_join, result_num_cols, result_cols,
            left_index_out, right_index_out);

    l_index_temp.reset(nullptr);
    r_index_temp.reset(nullptr);

    CUDA_CHECK_LAST();

    return df_err;
}

gdf_error gdf_left_join(
