summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Xiang2013-04-15 15:47:41 +0000
committerJun Xiang2013-04-22 10:19:53 +0000
commit5f0b80d57febcd22f43cca385042de35d2485723 (patch)
tree5b2252e89c9ece30824e5a4dbccf204727ac179c
parenta772e236fd0cdc9621abc608b77b5a84224788b3 (diff)
cleo/devkit/plcdrv[av]: clean skb free bug in plcdrv, closes #3930
- Line 280 has freed skb, but line 284 still use the skb. - If netlink_unicast () return < 0, which always free nlskb by himself,but there will free the nlskb twice.
-rw-r--r--cleopatre/devkit/plcdrv/src/frame.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cleopatre/devkit/plcdrv/src/frame.c b/cleopatre/devkit/plcdrv/src/frame.c
index 71f427a3a6..5cfb9f71e4 100644
--- a/cleopatre/devkit/plcdrv/src/frame.c
+++ b/cleopatre/devkit/plcdrv/src/frame.c
@@ -281,14 +281,13 @@ frame_rx_mme_priv (plcdrv_t *priv, uint32_t data_addr,
/* Get destination netlink. */
BUG_ON (data_length <= ETH_MME_TYPE_OFFSET);
- if (MMTYPE_IS_DRV (frame_get_eth_mme_type (skb->data)))
+ if (MMTYPE_IS_DRV (frame_get_eth_mme_type (NLMSG_DATA (nlh))))
nl = &priv->nl_plcd;
else
nl = &priv->nl_managerd;
/* Send to netlink. */
- if (netlink_unicast (nl->sock, nlskb, nl->pid, MSG_DONTWAIT) < 0)
- goto nlmsg_failure;
+ netlink_unicast (nl->sock, nlskb, nl->pid, MSG_DONTWAIT);
return;