]> err.no Git - util-linux/commit
mount: fix memory usage in update_mtab
authorMike Frysinger <vapier@gentoo.org>
Fri, 13 Apr 2007 11:54:38 +0000 (07:54 -0400)
committerKarel Zak <kzak@redhat.com>
Wed, 25 Apr 2007 22:31:39 +0000 (00:31 +0200)
commit1510285d494fc8937036027303fcd3305e7873fb
treeee4cf42589df587f6c0f235c10aab98261d9cd2a
parent3cccadb2f7a842d3296cf5949892177b45946a72
mount: fix memory usage in update_mtab

The update_mtab deallocates memory which was allocated by caller. It's nice
opportunity for double-free errors.

The patch fix a memory leak if we have to abort before mc0 are freed.  The
patch also fix a memory leak when we deallocate old (umounted) entry.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/fstab.c