patch-2.3.15 linux/net/sched/cls_api.c
Next file: linux/net/sched/cls_fw.c
Previous file: linux/net/sched/Makefile
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Mon Aug 23 10:01:02 1999
- Orig file:
v2.3.14/linux/net/sched/cls_api.c
- Orig date:
Wed Aug 18 11:38:49 1999
diff -u --recursive --new-file v2.3.14/linux/net/sched/cls_api.c linux/net/sched/cls_api.c
@@ -145,7 +145,7 @@
/* Find head of filter chain. */
/* Find link */
- if ((dev = dev_get_by_index(t->tcm_ifindex)) == NULL)
+ if ((dev = __dev_get_by_index(t->tcm_ifindex)) == NULL)
return -ENODEV;
/* Find qdisc */
@@ -372,6 +372,7 @@
q = qdisc_lookup(dev, TC_H_MAJ(tcm->tcm_parent));
if (q == NULL) {
read_unlock(&qdisc_tree_lock);
+ dev_put(dev);
return skb->len;
}
if ((cops = q->ops->cl_ops) == NULL)
@@ -425,6 +426,7 @@
cops->put(q, cl);
read_unlock(&qdisc_tree_lock);
+ dev_put(dev);
return skb->len;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)