diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-22 14:23:55 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-22 14:32:52 +0400 |
commit | b722054db3f7d78646bd17b59ff05a9a501303c8 (patch) | |
tree | ffb66bc47918d10930e9c8a32e7b1c475d51b566 /source/blender/blenloader/intern/writefile.c | |
parent | 933c2b052145de24d8cc88353181f9ea74644373 (diff) |
Make memory checker happy about FileGlobal
FileGlobal structure in write_global() didn't initialize
the while build_hash property and only placed there null
terminated meaningful content, leaving trailing uninitialized.
This made valgrind complain about using uninitialized memory
later in undo stack.
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index b60459e2477..238ba0cce2f 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -3274,6 +3274,7 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar) /* prevent mem checkers from complaining */ fg.pads= 0; memset(fg.filename, 0, sizeof(fg.filename)); + memset(fg.build_hash, 0, sizeof(fg.build_hash)); current_screen_compat(mainvar, &screen); |