Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107290371
D46580.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
945 B
Referenced Files
None
Subscribers
None
D46580.diff
View Options
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -3572,11 +3572,13 @@
host_list : ipspec optnl { $$ = $1; }
| host_list comma ipspec optnl {
- if ($3 == NULL)
+ if ($1 == NULL) {
+ freehostlist($3);
$$ = $1;
- else if ($1 == NULL)
+ } else if ($3 == NULL) {
+ freehostlist($1);
$$ = $3;
- else {
+ } else {
$1->tail->next = $3;
$1->tail = $3->tail;
$$ = $1;
@@ -6270,6 +6272,12 @@
return (0);
}
+void
+freehostlist(struct node_host *h)
+{
+ FREE_LIST(struct node_host, h);
+}
+
#undef FREE_LIST
#undef LOOP_THROUGH
diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h
--- a/sbin/pfctl/pfctl_parser.h
+++ b/sbin/pfctl/pfctl_parser.h
@@ -137,6 +137,8 @@
struct node_host *tail;
};
+void freehostlist(struct node_host *);
+
struct node_mac {
u_int8_t mac[ETHER_ADDR_LEN];
u_int8_t mask[ETHER_ADDR_LEN];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 13, 1:46 AM (20 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15774750
Default Alt Text
D46580.diff (945 B)
Attached To
Mode
D46580: pfctl: fix incorrect optimization
Attached
Detach File
Event Timeline
Log In to Comment