Commit dbde2ea6 authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by David S. Miller

[IRDA]: Fix SKB leaks in af_irda.c, from Arnaldo Carvalho de Melo.

parent 46a3dac2
...@@ -188,8 +188,10 @@ static void irda_connect_confirm(void *instance, void *sap, ...@@ -188,8 +188,10 @@ static void irda_connect_confirm(void *instance, void *sap,
IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
sk = self->sk; sk = self->sk;
if (sk == NULL) if (sk == NULL) {
dev_kfree_skb(skb);
return; return;
}
dev_kfree_skb(skb); dev_kfree_skb(skb);
// Should be ??? skb_queue_tail(&sk->sk_receive_queue, skb); // Should be ??? skb_queue_tail(&sk->sk_receive_queue, skb);
...@@ -248,8 +250,10 @@ static void irda_connect_indication(void *instance, void *sap, ...@@ -248,8 +250,10 @@ static void irda_connect_indication(void *instance, void *sap,
IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
sk = self->sk; sk = self->sk;
if (sk == NULL) if (sk == NULL) {
dev_kfree_skb(skb);
return; return;
}
/* How much header space do we need to reserve */ /* How much header space do we need to reserve */
self->max_header_size = max_header_size; self->max_header_size = max_header_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment