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
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

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