Read_list_of_drives(): use me_type_malloced to free() me_type

fixes a bug with OpenBSD
This commit is contained in:
Thomas Bernard
2018-10-17 16:07:20 +02:00
parent 69142724ef
commit e6f8d532c8

View File

@@ -791,9 +791,10 @@ void Read_list_of_drives(T_Fileselector *list, byte name_length)
list->Nb_directories++;
}
next = mount_points_list -> me_next;
#if !(defined(__macosx__) || defined(__FreeBSD__))
if (mount_points_list->me_type_malloced)
{
free(mount_points_list -> me_type);
#endif
}
free(mount_points_list -> me_devname);
free(mount_points_list -> me_mountdir);
free(mount_points_list);