LCOV - code coverage report
Current view: top level - third_party/heimdal/lib/hcrypto/libtommath - bn_mp_clear.c (source / functions) Hit Total Coverage
Test: coverage report for master 70ed9daf Lines: 7 7 100.0 %
Date: 2024-01-11 09:59:51 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include "tommath_private.h"
       2             : #ifdef BN_MP_CLEAR_C
       3             : /* LibTomMath, multiple-precision integer library -- Tom St Denis */
       4             : /* SPDX-License-Identifier: Unlicense */
       5             : 
       6             : /* clear one (frees)  */
       7       62326 : void mp_clear(mp_int *a)
       8             : {
       9             :    /* only do anything if a hasn't been freed previously */
      10       62326 :    if (a->dp != NULL) {
      11             :       /* free ram */
      12    52208446 :       MP_FREE_DIGITS(a->dp, a->alloc);
      13             : 
      14             :       /* reset members to make debugging easier */
      15       62326 :       a->dp    = NULL;
      16       62326 :       a->alloc = a->used = 0;
      17       62326 :       a->sign  = MP_ZPOS;
      18             :    }
      19       62326 : }
      20             : #endif

Generated by: LCOV version 1.14