e2fsprogs/util
Eric Sandeen d5c1d82ed8 subst: Fix free of uninit pointers
in add_subst(), if the malloc of ent->name fails, we goto fail;
which will free ent->name (which is null, so OK) but also free
ent->value (which is uninitialized).  There is no case where
we must free ent->value on an error (it is allocated last, and
if it fails it of course doesn't need to be freed) so just
remove it.

Also "retval" is only assigned once to the constant ENOMEM,
so we can just return that explicitly in the failure case.

Signed-off-by: Eric Saneeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-09-16 18:43:05 -04:00
..
Makefile.in Add support for configure --enable-verbose-makecmds 2009-07-02 00:11:17 -04:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
all.exclude Treat build.static as an ingored file in the source directory 2008-07-07 09:35:36 -04:00
copy_sparse.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
gcc-wall-cleanup Fix gcc -Wall nitpicks 2003-12-07 01:28:50 -05:00
gen-tarball.in Unbreak build if directory renamed from e2fsprogs. 2008-09-07 21:53:28 -04:00
libecho.c Makefile.pq, libecho.c: 1997-10-31 06:25:24 +00:00
subset.exclude Add build.static to util/subset.exclude as well. 2008-07-07 16:34:34 -04:00
subst.c subst: Fix free of uninit pointers 2011-09-16 18:43:05 -04:00
subst.conf.in Add datarootdir definition for compatibility with autoconf 2.60 2006-10-22 00:14:26 -04:00