[PKT_SCHED]: act_api: Fix module leak while flushing actions
authorThomas Graf <tgraf@suug.ch>
Tue, 7 Nov 2006 14:34:27 +0000 (15:34 +0100)
committerAdrian Bunk <bunk@stusta.de>
Tue, 7 Nov 2006 14:34:27 +0000 (15:34 +0100)
Module reference needs to be given back if message header
construction fails.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
net/sched/act_api.c

index eb7dc2947a0a2212eac81dfbd320d1c20179548f..a9fab455df08b4f177428d85aa8551fcef768550 100644 (file)
@@ -603,8 +603,8 @@ static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
        return err;
 
 rtattr_failure:
-       module_put(a->ops->owner);
 nlmsg_failure:
+       module_put(a->ops->owner);
 err_out:
        kfree_skb(skb);
        kfree(a);