* [2.4] memleak in implementation of the IEEE 802.2 LLC protocol?
@ 2003-06-15 9:26 Oleg Drokin
0 siblings, 0 replies; only message in thread
From: Oleg Drokin @ 2003-06-15 9:26 UTC (permalink / raw)
To: linux-kernel, alan
Hello!
I am trying to teach smatch's unfree script of skbuffers as those could
create memory leaks if not freed, and I come across this code in
./net/802/llc_sendpdu.c::llc_sendipdu() in 2.4.21 kernel:
tmp=skb_clone(skb, GFP_ATOMIC);
if(tmp!=NULL)
{
tmp->dev = lp->dev;
dev_queue_xmit(skb);
}
(and tmp is not used anywhere else)
Naturally looking at llc_sendipdu() function that have similar construction,
I think that this small change should be done to avoid memleak
and to make the code correct, what do you think?
===== net/802/llc_sendpdu.c 1.3 vs edited =====
--- 1.3/net/802/llc_sendpdu.c Tue Feb 5 10:39:14 2002
+++ edited/net/802/llc_sendpdu.c Sun Jun 15 13:23:39 2003
@@ -283,7 +283,7 @@
if(tmp!=NULL)
{
tmp->dev = lp->dev;
- dev_queue_xmit(skb);
+ dev_queue_xmit(tmp);
}
resend_count++;
skb = skb->next;
Bye,
Oleg
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-06-15 9:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-15 9:26 [2.4] memleak in implementation of the IEEE 802.2 LLC protocol? Oleg Drokin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox