summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tar_type.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tar_type.h b/src/tar_type.h
index 04f7250e6..233b0eada 100644
--- a/src/tar_type.h
+++ b/src/tar_type.h
@@ -12,6 +12,10 @@
struct TarListEntry {
const char *filename;
+ /* 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); }
};