view libtomcrypt/src/pk/asn1/der/sequence/der_sequence_free.c @ 1402:553c6bb80265

fix DEBUG_* condition
author Francois Perrad <francois.perrad@gadz.org>
date Sat, 19 Nov 2016 10:47:18 +0100
parents 0cbe8f6dbf9e
children f849a5ca2efc
line wrap: on
line source

/* LibTomCrypt, modular cryptographic library -- Tom St Denis
 *
 * LibTomCrypt is a library that provides various cryptographic
 * algorithms in a highly modular and flexible manner.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, [email protected], http://libtomcrypt.com
 */
#include "tomcrypt.h"

/**
  @file der_sequence_free.c
  ASN.1 DER, free's a structure allocated by der_decode_sequence_flexi(), Tom St Denis
*/

#ifdef LTC_DER

/**
  Free memory allocated by der_decode_sequence_flexi()
  @param in     The list to free
*/  
void der_sequence_free(ltc_asn1_list *in)
{
   ltc_asn1_list *l;
   
   /* walk to the start of the chain */
   while (in->prev != NULL || in->parent != NULL) {
      if (in->parent != NULL) {