--- linux-2.6.3-old/net/ipv4/netfilter/ip_queue.c 2004-02-18 04:59:59.000000000 +0100 +++ linux-2.6.3/net/ipv4/netfilter/ip_queue.c 2004-03-23 10:31:16.000000000 +0100 @@ -277,6 +277,9 @@ struct sk_buff *nskb; struct ipq_queue_entry *entry; + if (!peer_pid) + return -EINVAL; + if (copy_mode == IPQ_COPY_NONE) return -EAGAIN; @@ -303,9 +306,6 @@ write_lock_bh(&queue_lock); - if (!peer_pid) - goto err_out_free_nskb; - /* netlink_unicast will either free the nskb or attach it to a socket */ status = netlink_unicast(ipqnl, nskb, peer_pid, MSG_DONTWAIT); if (status < 0) @@ -318,9 +318,6 @@ write_unlock_bh(&queue_lock); return status; -err_out_free_nskb: - kfree_skb(nskb); - err_out_unlock: write_unlock_bh(&queue_lock);