No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / dist / heimdal / lib / asn1 / der_free.c
blob6c40a2af018bf233a792f31ba84bb20476d5fadf
1 /*
2 * Copyright (c) 1997 - 2005 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the Institute nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
34 #include "der_locl.h"
36 __RCSID("$Heimdal: der_free.c 19539 2006-12-28 17:15:05Z lha $"
37 "$NetBSD$");
39 void
40 der_free_general_string (heim_general_string *str)
42 free(*str);
43 *str = NULL;
46 void
47 der_free_utf8string (heim_utf8_string *str)
49 free(*str);
50 *str = NULL;
53 void
54 der_free_printable_string (heim_printable_string *str)
56 free(*str);
57 *str = NULL;
60 void
61 der_free_ia5_string (heim_ia5_string *str)
63 free(*str);
64 *str = NULL;
67 void
68 der_free_bmp_string (heim_bmp_string *k)
70 free(k->data);
71 k->data = NULL;
72 k->length = 0;
75 void
76 der_free_universal_string (heim_universal_string *k)
78 free(k->data);
79 k->data = NULL;
80 k->length = 0;
83 void
84 der_free_visible_string (heim_visible_string *str)
86 free(*str);
87 *str = NULL;
90 void
91 der_free_octet_string (heim_octet_string *k)
93 free(k->data);
94 k->data = NULL;
95 k->length = 0;
98 void
99 der_free_heim_integer (heim_integer *k)
101 free(k->data);
102 k->data = NULL;
103 k->length = 0;
106 void
107 der_free_oid (heim_oid *k)
109 free(k->components);
110 k->components = NULL;
111 k->length = 0;
114 void
115 der_free_bit_string (heim_bit_string *k)
117 free(k->data);
118 k->data = NULL;
119 k->length = 0;