diff options
Diffstat (limited to 'src/tar_type.h')
-rw-r--r-- | src/tar_type.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tar_type.h b/src/tar_type.h index 2cfbc4fb6..4dda00359 100644 --- a/src/tar_type.h +++ b/src/tar_type.h @@ -11,12 +11,13 @@ /** The define of a TarList. */ struct TarListEntry { const char *filename; + const char *dirname; /* MSVC goes copying around this struct after initialisation, so it tries * to free filename, which isn't set at that moment... but because it * initializes the variable with garbage, it's going to segfault. */ - TarListEntry() : filename(NULL) {} - ~TarListEntry() { free((void*)this->filename); } + TarListEntry() : filename(NULL), dirname(NULL) {} + ~TarListEntry() { free((void*)this->filename); free((void*)this->dirname); } }; struct TarFileListEntry { |