diff --git a/src/mountlist.c b/src/mountlist.c
index bd9e8d9..1bef645 100644
a
|
b
|
static int get_fs_usage (char *path, struct fs_usage *fsp); |
148 | 148 | |
149 | 149 | static struct mount_entry *mount_list = NULL; |
150 | 150 | |
| 151 | static void free_mount_entry (struct mount_entry *me) |
| 152 | { |
| 153 | if (!me) |
| 154 | return; |
| 155 | if (me->me_devname) |
| 156 | free (me->me_devname); |
| 157 | if (me->me_mountdir) |
| 158 | free (me->me_mountdir); |
| 159 | if (me->me_type) |
| 160 | free (me->me_type); |
| 161 | free (me); |
| 162 | } |
| 163 | |
151 | 164 | #ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ |
152 | 165 | /* Return the value of the hexadecimal number represented by CP. |
153 | 166 | No prefix (like '0x') or suffix (like 'h') is expected to be |
… |
… |
void |
675 | 688 | init_my_statfs (void) |
676 | 689 | { |
677 | 690 | #ifdef HAVE_INFOMOUNT_LIST |
| 691 | while (mount_list) { |
| 692 | struct mount_entry *next = mount_list->me_next; |
| 693 | free_mount_entry (mount_list); |
| 694 | mount_list = next; |
| 695 | } |
| 696 | |
678 | 697 | mount_list = read_filesystem_list (1, 1); |
679 | 698 | #endif /* HAVE_INFOMOUNT_LIST */ |
680 | 699 | } |