Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102926280
D45041.id137940.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
578 B
Referenced Files
None
Subscribers
None
D45041.id137940.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D45041: sysctl: Make sysctl_ctx_free() a bit safer
Attached
Detach File
Event Timeline
Log In to Comment