Never free an skb that has been passed to genlmsg_reply().
authorBen Pfaff <blp@nicira.com>
Thu, 13 Nov 2008 18:25:06 +0000 (10:25 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 13 Nov 2008 20:45:38 +0000 (12:45 -0800)
genlmsg_reply() always consumes its argument, not just in the success case.

datapath/datapath.c

index 07fa92d0740883f996119a476b49cbf66bf75793..2a8e5a9643f57bdedb4c2442cb9c4e8f59cdffaa 100644 (file)
@@ -1176,8 +1176,7 @@ static int dp_genl_query(struct sk_buff *skb, struct genl_info *info)
 
                genlmsg_end(ans_skb, data);
                err = genlmsg_reply(ans_skb, info);
-               if (!err)
-                       ans_skb = NULL;
+               ans_skb = NULL;
        }
 err:
 nla_put_failure: