When freeing a superblock returned by ffs_sbget, be sure to also
free the superblock summary information. Reported by: Peter Holm (pho@) Tested by: Peter Holm (pho@)
This commit is contained in:
parent
e9862013d8
commit
44f0dfb9b7
@ -83,6 +83,7 @@ g_journal_ufs_dirty(struct g_consumer *cp)
|
||||
fs->fs_clean = 0;
|
||||
fs->fs_flags |= FS_NEEDSFSCK | FS_UNCLEAN;
|
||||
error = ffs_sbput(cp, fs, fs->fs_sblockloc, g_use_g_write_data);
|
||||
g_free(fs->fs_csp);
|
||||
g_free(fs);
|
||||
if (error != 0) {
|
||||
GJ_DEBUG(0, "Cannot mark file system %s as dirty "
|
||||
|
@ -103,8 +103,7 @@ g_label_ufs_taste_common(struct g_consumer *cp, char *label, size_t size, int wh
|
||||
|| G_LABEL_UFS_CMP(pp, fs, fs_providersize))) {
|
||||
/* Valid UFS2. */
|
||||
} else {
|
||||
g_free(fs);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
G_LABEL_DEBUG(1, "%s file system detected on %s.",
|
||||
fs->fs_magic == FS_UFS1_MAGIC ? "UFS1" : "UFS2", pp->name);
|
||||
@ -120,6 +119,8 @@ g_label_ufs_taste_common(struct g_consumer *cp, char *label, size_t size, int wh
|
||||
fs->fs_id[1]);
|
||||
break;
|
||||
}
|
||||
out:
|
||||
g_free(fs->fs_csp);
|
||||
g_free(fs);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user