mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
IFp4: Don't free pathname too soon, debugging code is still using it.
This commit is contained in:
parent
11c68fb23f
commit
5189bf22c0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185171
@ -88,11 +88,9 @@ spa_config_load(void)
|
||||
|
||||
file = kobj_open_file(pathname);
|
||||
|
||||
kmem_free(pathname, MAXPATHLEN);
|
||||
|
||||
if (file == (struct _buf *)-1) {
|
||||
ZFS_LOG(1, "Cannot open %s.", pathname);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (kobj_get_filesize(file, &fsize) != 0) {
|
||||
@ -146,10 +144,11 @@ spa_config_load(void)
|
||||
nvlist_free(nvlist);
|
||||
|
||||
out:
|
||||
kmem_free(pathname, MAXPATHLEN);
|
||||
if (buf != NULL)
|
||||
kmem_free(buf, fsize);
|
||||
|
||||
kobj_close_file(file);
|
||||
if (file != (struct _buf *)-1)
|
||||
kobj_close_file(file);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user