]> diplodocus.org Git - nmh/blob - sbr/folder_free.c
Add support for a -nosasl switch.
[nmh] / sbr / folder_free.c
1
2 /*
3 * folder_free.c -- free a folder/message structure
4 *
5 * This code is Copyright (c) 2002, by the authors of nmh. See the
6 * COPYRIGHT file in the root directory of the nmh distribution for
7 * complete copyright information.
8 */
9
10 #include <h/mh.h>
11
12
13 void
14 folder_free (struct msgs *mp)
15 {
16 int i;
17
18 if (!mp)
19 return;
20
21 if (mp->foldpath)
22 free (mp->foldpath);
23
24 /* free the sequence names */
25 for (i = 0; mp->msgattrs[i]; i++)
26 free (mp->msgattrs[i]);
27
28 free (mp->msgstats); /* free message status area */
29 free (mp); /* free main folder structure */
30 }