aboutsummaryrefslogtreecommitdiff
path: root/lib/libufs/type.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2020-06-23 21:28:26 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2020-06-23 21:28:26 +0000
commit92c839a156ba96c821e8b6c16892f583115b6d40 (patch)
tree55e44e30e4630c6dcd9deacb182d0803d0e069c5 /lib/libufs/type.c
parent7ac5cc13b53504d85d91d30c16fe0a5a950b2589 (diff)
downloadsrc-92c839a156ba96c821e8b6c16892f583115b6d40.tar.gz
src-92c839a156ba96c821e8b6c16892f583115b6d40.zip
The libufs library needs to track and free the new fs_si structure
in addition to the fs_csp structure that it references. PR: 247425 Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=362559
Diffstat (limited to 'lib/libufs/type.c')
-rw-r--r--lib/libufs/type.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libufs/type.c b/lib/libufs/type.c
index bcbb1914c497..653ef8ceeea1 100644
--- a/lib/libufs/type.c
+++ b/lib/libufs/type.c
@@ -69,9 +69,10 @@ ufs_disk_close(struct uufsd *disk)
free((char *)(uintptr_t)disk->d_name);
disk->d_name = NULL;
}
- if (disk->d_sbcsum != NULL) {
- free(disk->d_sbcsum);
- disk->d_sbcsum = NULL;
+ if (disk->d_si != NULL) {
+ free(disk->d_si->si_csp);
+ free(disk->d_si);
+ disk->d_si = NULL;
}
return (0);
}
@@ -164,7 +165,7 @@ again: if ((ret = stat(name, &st)) < 0) {
disk->d_mine = 0;
disk->d_ufs = 0;
disk->d_error = NULL;
- disk->d_sbcsum = NULL;
+ disk->d_si = NULL;
if (oname != name) {
name = strdup(name);