diff options
author | Thomas Rast <trast@student.ethz.ch> | 2012-03-05 14:48:49 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-03-05 09:36:09 -0800 |
commit | a8ea1b7a5580bc4377818fb6718d55d4b735dae8 (patch) | |
tree | 7c9d7ab1d5e2f52beb7eba73d86730c777472168 /t/t5515/refs.br-branches-one | |
parent | Update draft release notes to 1.7.9.3 for the last time (diff) | |
download | tgif-a8ea1b7a5580bc4377818fb6718d55d4b735dae8.tar.xz |
fast-import: zero all of 'struct tag' to silence valgrind
When running t9300, valgrind (correctly) complains about an
uninitialized value in write_crash_report:
==2971== Use of uninitialised value of size 8
==2971== at 0x4164F4: sha1_to_hex (hex.c:70)
==2971== by 0x4073E4: die_nicely (fast-import.c:468)
==2971== by 0x43284C: die (usage.c:86)
==2971== by 0x40420D: main (fast-import.c:2731)
==2971== Uninitialised value was created by a heap allocation
==2971== at 0x4C29B3D: malloc (vg_replace_malloc.c:263)
==2971== by 0x433645: xmalloc (wrapper.c:35)
==2971== by 0x405DF5: pool_alloc (fast-import.c:619)
==2971== by 0x407755: pool_calloc.constprop.14 (fast-import.c:634)
==2971== by 0x403F33: main (fast-import.c:3324)
Fix this by zeroing all of the 'struct tag'. We would only need to
zero out the 'sha1' field, but this way seems more future-proof.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515/refs.br-branches-one')
0 files changed, 0 insertions, 0 deletions