aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ufs/super.c')
-rw-r--r--fs/ufs/super.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index f036d694ba5a..54828ebcf1ba 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -472,13 +472,14 @@ static int ufs_read_cylinder_structures (struct super_block *sb) {
472 return 1; 472 return 1;
473 473
474failed: 474failed:
475 if (base) kfree (base); 475 kfree (base);
476 if (sbi->s_ucg) { 476 if (sbi->s_ucg) {
477 for (i = 0; i < uspi->s_ncg; i++) 477 for (i = 0; i < uspi->s_ncg; i++)
478 if (sbi->s_ucg[i]) brelse (sbi->s_ucg[i]); 478 if (sbi->s_ucg[i])
479 brelse (sbi->s_ucg[i]);
479 kfree (sbi->s_ucg); 480 kfree (sbi->s_ucg);
480 for (i = 0; i < UFS_MAX_GROUP_LOADED; i++) 481 for (i = 0; i < UFS_MAX_GROUP_LOADED; i++)
481 if (sbi->s_ucpi[i]) kfree (sbi->s_ucpi[i]); 482 kfree (sbi->s_ucpi[i]);
482 } 483 }
483 UFSD(("EXIT (FAILED)\n")) 484 UFSD(("EXIT (FAILED)\n"))
484 return 0; 485 return 0;
@@ -981,9 +982,10 @@ magic_found:
981dalloc_failed: 982dalloc_failed:
982 iput(inode); 983 iput(inode);
983failed: 984failed:
984 if (ubh) ubh_brelse_uspi (uspi); 985 if (ubh)
985 if (uspi) kfree (uspi); 986 ubh_brelse_uspi (uspi);
986 if (sbi) kfree(sbi); 987 kfree (uspi);
988 kfree(sbi);
987 sb->s_fs_info = NULL; 989 sb->s_fs_info = NULL;
988 UFSD(("EXIT (FAILED)\n")) 990 UFSD(("EXIT (FAILED)\n"))
989 return -EINVAL; 991 return -EINVAL;