Page MenuHomeFreeBSD

D45041.id137940.diff
No OneTemporary

D45041.id137940.diff

diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -651,17 +651,15 @@
return(EBUSY);
}
/* Now really delete the entries */
- e = TAILQ_FIRST(clist);
- while (e != NULL) {
- e1 = TAILQ_NEXT(e, link);
+ TAILQ_FOREACH_SAFE(e, clist, link, e1) {
error = sysctl_remove_oid_locked(e->entry, 1, 0);
if (error)
panic("sysctl_remove_oid: corrupt tree, entry: %s",
e->entry->oid_name);
free(e, M_SYSCTLOID);
- e = e1;
}
SYSCTL_WUNLOCK();
+ TAILQ_INIT(clist);
return (error);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 8:14 PM (21 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14722892
Default Alt Text
D45041.id137940.diff (578 B)

Event Timeline