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