[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 599423c..0972247 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);