Free FS info before closing panel.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2010-03-05 23:06:53 +03:00
parent 69988b0395
commit cc26fd2bec
3 changed files with 12 additions and 1 deletions

View File

@ -688,7 +688,7 @@ read_filesystem_list(int need_fs_type, int all_fs)
#endif /* HAVE_INFOMOUNT_QNX */
void
init_my_statfs (void)
free_my_statfs (void)
{
#ifdef HAVE_INFOMOUNT_LIST
while (mount_list) {
@ -696,7 +696,16 @@ init_my_statfs (void)
free_mount_entry (mount_list);
mount_list = next;
}
mount_list = NULL;
#endif /* HAVE_INFOMOUNT_LIST */
}
void
init_my_statfs (void)
{
#ifdef HAVE_INFOMOUNT_LIST
free_my_statfs ();
mount_list = read_filesystem_list (1, 1);
#endif /* HAVE_INFOMOUNT_LIST */
}

View File

@ -36,5 +36,6 @@ struct my_statfs {
void init_my_statfs (void);
void my_statfs (struct my_statfs *myfs_stats, const char *path);
void free_my_statfs (void);
#endif

View File

@ -3100,6 +3100,7 @@ panel_callback (Widget * w, widget_msg_t msg, int parm)
case WIDGET_DESTROY:
panel_destroy (panel);
free_my_statfs ();
return MSG_HANDLED;
default: