diff options
author | rubidium <rubidium@openttd.org> | 2008-07-23 21:42:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-23 21:42:55 +0000 |
commit | 81c50c6c325adcf771f000190d53ab911d83d2f6 (patch) | |
tree | 5f7e724fed8e39f3f83257b35a23af0c6089b3ab /src/tar_type.h | |
parent | a050a7852518c4443e41021dead24f8fc3bfb726 (diff) | |
download | openttd-81c50c6c325adcf771f000190d53ab911d83d2f6.tar.xz |
(svn r13810) -Fix: small memory leak when tar files would be found.
Diffstat (limited to 'src/tar_type.h')
-rw-r--r-- | src/tar_type.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tar_type.h b/src/tar_type.h index b622da644..04f7250e6 100644 --- a/src/tar_type.h +++ b/src/tar_type.h @@ -11,15 +11,17 @@ /** The define of a TarList. */ struct TarListEntry { const char *filename; + + ~TarListEntry() { free((void*)this->filename); } }; struct TarFileListEntry { - TarListEntry *tar; + const char *tar_filename; size_t size; size_t position; }; -typedef std::map<std::string, TarListEntry *> TarList; +typedef std::map<std::string, TarListEntry> TarList; typedef std::map<std::string, TarFileListEntry> TarFileList; extern TarList _tar_list; extern TarFileList _tar_filelist; |