LCOV - code coverage report
Current view: top level - experimental/utility - LAGraph_SFreeContents.c (source / functions) Hit Total Coverage
Test: LAGraph code coverage report. Commit id: 3b461aa. Current time (UTC): 2024-01-25T16:04:32Z Lines: 8 8 100.0 %
Date: 2024-01-25 16:05:28 Functions: 1 1 100.0 %

          Line data    Source code
       1             : //------------------------------------------------------------------------------
       2             : // LAGraph_SFreeContents: free the Contents returned by LAGraph_SRead.
       3             : //------------------------------------------------------------------------------
       4             : 
       5             : // LAGraph, (c) 2019-2022 by The LAGraph Contributors, All Rights Reserved.
       6             : // SPDX-License-Identifier: BSD-2-Clause
       7             : //
       8             : // For additional details (including references to third party source code and
       9             : // other files) see the LICENSE file or contact permission@sei.cmu.edu. See
      10             : // Contributors.txt for a full list of contributors. Created, in part, with
      11             : // funding and support from the U.S. Government (see Acknowledgments.txt file).
      12             : // DM22-0790
      13             : 
      14             : // Contributed by Timothy A. Davis, Texas A&M University
      15             : 
      16             : //------------------------------------------------------------------------------
      17             : 
      18             : #include "LG_internal.h"
      19             : #include "LAGraphX.h"
      20             : 
      21           8 : void LAGraph_SFreeContents  // free the Contents returned by LAGraph_SRead
      22             : (
      23             :     // input/output
      24             :     LAGraph_Contents **Contents_handle,     // array of size ncontents
      25             :     GrB_Index ncontents
      26             : )
      27             : {
      28           8 :     if (Contents_handle != NULL)
      29             :     {
      30           8 :         LAGraph_Contents *Contents = (*Contents_handle) ;
      31           8 :         if (Contents != NULL)
      32             :         {
      33         110 :             for (GrB_Index i = 0 ; i < ncontents ; i++)
      34             :             {
      35         105 :                 LAGraph_Free ((void **) &(Contents [i].blob), NULL) ;
      36             :             }
      37             :         }
      38           8 :         LAGraph_Free ((void **) Contents_handle, NULL) ;
      39             :     }
      40           8 : }

Generated by: LCOV version 1.14