Whamcloud - gitweb
LU-2281 utils: Fix possible segfault in tunefs.lustre
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Mon, 5 Nov 2012 21:22:33 +0000 (16:22 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 7 Nov 2012 02:54:35 +0000 (21:54 -0500)
commit32ad9cdf2e99eff52b9241c1f306c45eb19acc62
treed554c18885d3eafcdb9c08bb8f5932912f4a5fea
parent3b41ac8f3feee5252a55553ad795545cfc8636f6
LU-2281 utils: Fix possible segfault in tunefs.lustre

ldiskfs_read_ldd() can segfault if fopen of mountdata fails, because
it will always try to fclose the file handled (which if it is NULL,
dies).

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I553a7972b61ec01473bf834f98f8937bc7b11dbc
Reviewed-on: http://review.whamcloud.com/4470
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/mount_utils_ldiskfs.c