1
0
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:
Pawel Jakub Dawidek 2008-11-22 13:22:24 +00:00
parent 11c68fb23f
commit 5189bf22c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185171

View File

@ -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