]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PKT_SCHED]: act_api: Fix module leak while flushing actions
authorThomas Graf <tgraf@suug.ch>
Sun, 9 Jul 2006 18:36:23 +0000 (11:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 9 Jul 2006 18:36:23 +0000 (11:36 -0700)
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>
net/sched/act_api.c

index 599423cc9d0d67796c4936f1d15c08fe979d1e0e..0972247a839c7b239a7202de5d3293970eae7bd1 100644 (file)
@@ -602,8 +602,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);