src/mess/tools/imgtool/windows/wimgtool.c
| r7815 | r7816 | |
| 1081 | 1081 | read_or_write = OSD_FOPEN_READ; |
| 1082 | 1082 | } |
| 1083 | 1083 | |
| 1084 | if (info->filename) |
| 1085 | osd_free(info->filename); |
| 1084 | 1086 | info->filename = mame_strdup(filename); |
| 1085 | 1087 | if (!info->filename) |
| 1086 | 1088 | { |
| r7815 | r7816 | |
| 1114 | 1116 | info->open_mode = read_or_write; |
| 1115 | 1117 | if (info->current_directory) |
| 1116 | 1118 | { |
| 1117 | | free(info->current_directory); |
| 1119 | osd_free(info->current_directory); |
| 1118 | 1120 | info->current_directory = NULL; |
| 1119 | 1121 | } |
| 1120 | 1122 | |
| r7815 | r7816 | |
| 1682 | 1684 | |
| 1683 | 1685 | if (info) |
| 1684 | 1686 | { |
| 1687 | if (info->filename) |
| 1688 | osd_free(info->filename); |
| 1685 | 1689 | if (info->partition) |
| 1686 | 1690 | imgtool_partition_close(info->partition); |
| 1687 | 1691 | if (info->image) |
| r7815 | r7816 | |
| 1689 | 1693 | pile_delete(&info->iconlist_extensions); |
| 1690 | 1694 | DestroyIcon(info->readonly_icon); |
| 1691 | 1695 | if (info->current_directory) |
| 1692 | | free(info->current_directory); |
| 1696 | osd_free(info->current_directory); |
| 1693 | 1697 | free(info); |
| 1694 | 1698 | } |
| 1695 | 1699 | } |