]> git.ipfire.org Git - thirdparty/coreutils.git/commit
df: fix use of uninitialized variable reported by valgrind
authorPádraig Brady <P@draigBrady.com>
Thu, 2 Apr 2015 04:34:07 +0000 (05:34 +0100)
committerPádraig Brady <P@draigBrady.com>
Fri, 3 Apr 2015 13:27:27 +0000 (14:27 +0100)
commitbf180f8f5a53eb82054e85e26dcd1ea7c43dbdfe
tree401ee5186c164b9e9ed4f4ac74efa6630d4a9fa8
parentccf1cd87f8b0c1cb5f5801a6be1ce8f44a165a19
df: fix use of uninitialized variable reported by valgrind

 Conditional jump or move depends on uninitialised value(s)
    at 0x40380C: get_field_values (df.c:840)
    by 0x403E16: get_dev (df.c:994)
    by 0x404D65: get_all_entries (df.c:1364)
    by 0x405926: main (df.c:1714)

* src/df.c (get_dev): Initialize the fsu.fsu_bavail_top_bit_set
member, when adding placeholder entries.
(main): Avoid a "definitely lost" memory leak warning from valgrind,
reported by Bernhard Voelker.
src/df.c