From 67270636a8285166c4ee035e1b53e99a7c55d232 Mon Sep 17 00:00:00 2001 From: WANG Cong Date: Fri, 10 Apr 2015 12:00:27 -0700 Subject: fou: exit early when parsing config fails Not a big deal, just for corretness. Cc: Tom Herbert Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- net/ipv4/fou.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net/ipv4/fou.c') diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c index c8db62718e5f..ad0ee827a0c0 100644 --- a/net/ipv4/fou.c +++ b/net/ipv4/fou.c @@ -605,8 +605,11 @@ static int fou_nl_cmd_add_port(struct sk_buff *skb, struct genl_info *info) static int fou_nl_cmd_rm_port(struct sk_buff *skb, struct genl_info *info) { struct fou_cfg cfg; + int err; - parse_nl_config(info, &cfg); + err = parse_nl_config(info, &cfg); + if (err) + return err; return fou_destroy(&init_net, &cfg); } -- cgit v1.2.3-59-g8ed1b