Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175345220
D60532.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
856 B
Referenced Files
None
Subscribers
None
D60532.diff
View Options
diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c
--- a/sys/netpfil/pf/pf_table.c
+++ b/sys/netpfil/pf/pf_table.c
@@ -850,15 +850,16 @@
pfr_insert_kentries(struct pfr_ktable *kt,
struct pfr_kentryworkq *workq, time_t tzero)
{
- struct pfr_kentry *p;
+ struct pfr_kentry *p, *q;
int rv, n = 0;
- SLIST_FOREACH(p, workq, pfrke_workq) {
+ SLIST_FOREACH_SAFE(p, workq, pfrke_workq, q) {
rv = pfr_route_kentry(kt, p);
if (rv) {
printf("pfr_insert_kentries: cannot route entry "
"(code=%d).\n", rv);
- break;
+ pfr_destroy_kentry(p);
+ continue;
}
p->pfrke_counters.pfrkc_tzero = tzero;
n++;
@@ -880,8 +881,10 @@
return (ENOMEM);
rv = pfr_route_kentry(kt, p);
- if (rv)
+ if (rv) {
+ pfr_destroy_kentry(p);
return (rv);
+ }
p->pfrke_counters.pfrkc_tzero = tzero;
kt->pfrkt_cnt++;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 11, 4:14 AM (11 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40549849
Default Alt Text
D60532.diff (856 B)
Attached To
Mode
D60532: pf: Free a table entry that cannot be routed
Attached
Detach File
Event Timeline
Log In to Comment