This patch tries to fix CID 997012, 997013 and 997014 reported by Coverity scan, as suggested by sekharan. Signed-off-by: Li Zhong <zhong@xxxxxxxxxxxxxxxxxx> --- repair/sb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/repair/sb.c b/repair/sb.c index aa550e3..7abf47c 100644 --- a/repair/sb.c +++ b/repair/sb.c @@ -756,8 +756,10 @@ verify_set_primary_sb(xfs_sb_t *rsb, /* * see if we have enough superblocks to bother with */ - if (num_ok < num_sbs / 2) - return(XR_INSUFF_SEC_SB); + if (num_ok < num_sbs / 2) { + retval = XR_INSUFF_SEC_SB; + goto out_free_list; + } current = get_best_geo(list); -- 1.8.1.4 _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs