Skip to content

Commit

Permalink
netfilter: x_tables: fix net namespace leak when reading /proc/net/xx…
Browse files Browse the repository at this point in the history
…x_tables_names

The seq_open_net() call should be accompanied with seq_release_net() one.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Apr 29, 2008
1 parent be8d0d7 commit 0e93bb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/x_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ static const struct file_operations xt_table_ops = {
.open = xt_table_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
.release = seq_release_net,
};

static void *xt_match_seq_start(struct seq_file *seq, loff_t *pos)
Expand Down

0 comments on commit 0e93bb9

Please sign in to comment.