From afc7f38c6b5adab2c942d72fbb7df41a700c492f Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 22 Jun 2005 15:20:11 +0000 Subject: [PATCH] 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 --- lib/libdevinfo/devinfo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libdevinfo/devinfo.c b/lib/libdevinfo/devinfo.c index a9734f9b0b2a..5ad68c3f046f 100644 --- a/lib/libdevinfo/devinfo.c +++ b/lib/libdevinfo/devinfo.c @@ -367,6 +367,7 @@ devinfo_free(void) free(dr); } devinfo_initted = 0; + devinfo_generation = 0; } /*