Clear devinfo_generation in devinfo_free() since we are freeing all of the

cached state.  Otherwise, a subsequent call to devinfo_init() would succeed
without reading the device tree from the kernel thinking that the cached
state was up to date since the generation count was the same.  However,
since the cached state was actually free'd, attempts to examine the tree
after the second devinfo_init() would fail.

Reported by:	Juho Vuori juho dot vuori at kepa dot fi
Submitted by:	Stefan Farfeleder stefan at fafoe dot narf dot at
Approved by:	re (dwhite)
MFC after:	1 week
This commit is contained in:
John Baldwin 2005-06-22 15:20:11 +00:00
parent 9a7feaa13c
commit afc7f38c6b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147529

View File

@ -367,6 +367,7 @@ devinfo_free(void)
free(dr);
}
devinfo_initted = 0;
devinfo_generation = 0;
}
/*