* [patch] fix networking memory leak in current -bk
@ 2003-10-04 7:36 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2003-10-04 7:36 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-kernel
Quicky fix for a horrid skb data leak...
net/core/dev.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff -puN net/core/dev.c~skb-leak-fix net/core/dev.c
--- 25/net/core/dev.c~skb-leak-fix 2003-10-04 00:32:19.000000000 -0700
+++ 25-akpm/net/core/dev.c 2003-10-04 00:33:18.000000000 -0700
@@ -1576,9 +1576,13 @@ int netif_receive_skb(struct sk_buff *sk
}
}
- if (pt_prev)
- ret = deliver_skb(skb, pt_prev, 1);
- else {
+ if (pt_prev) {
+ if (!pt_prev->data) {
+ ret = deliver_to_old_ones(pt_prev, skb, 1);
+ } else {
+ ret = pt_prev->func(skb, skb->dev, pt_prev);
+ }
+ } else {
kfree_skb(skb);
/* Jamal, now you will not able to escape explaining
* me how you were going to use this. :-)
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-10-04 7:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-04 7:36 [patch] fix networking memory leak in current -bk Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®