netfilter: ctnetlink: fix reliable event delivery if message building fails
[linux-2.6.git] / net / netfilter / nf_conntrack_netlink.c
index 2b2af63..569410a 100644 (file)
@@ -582,7 +582,9 @@ nla_put_failure:
 nlmsg_failure:
        kfree_skb(skb);
 errout:
-       nfnetlink_set_err(net, 0, group, -ENOBUFS);
+       if (nfnetlink_set_err(net, 0, group, -ENOBUFS) > 0)
+               return -ENOBUFS;
+
        return 0;
 }
 #endif /* CONFIG_NF_CONNTRACK_EVENTS */