Whamcloud - gitweb
quota: fix uninitiaized memory reference in mke2fs with quota enabled
authorTheodore Ts'o <tytso@mit.edu>
Thu, 30 Jan 2014 22:10:46 +0000 (17:10 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 30 Jan 2014 23:25:15 +0000 (18:25 -0500)
commit0dedd011eddf870c2f17e0811a36b0984aa09866
tree718feb571f7a1dd498793f12711c0b76cad6012c
parent5bb4d0cec4492ca9941dc0af31d88239ed8e42a5
quota: fix uninitiaized memory reference in mke2fs with quota enabled

Initialize the on-disk structure before we fill it in, to avoid the
following valgrind warning:

   Conditional jump or move depends on uninitialised value(s)
      at 0x4323A8: qtree_entry_unused (quotaio_tree.c:40)
      by 0x431218: v2r1_mem2diskdqblk (quotaio_v2.c:85)
      by 0x432409: qtree_write_dquot (quotaio_tree.c:336)
      by 0x431136: v2_commit_dquot (quotaio_v2.c:264)
      by 0x42FB63: quota_write_inode (mkquota.c:126)
      by 0x408BE6: create_quota_inodes (mke2fs.c:2466)
      by 0x409A2D: main (mke2fs.c:2850)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/quota/quotaio_tree.c