Subject: [PATCH PKT_SCHED 2/4]: cls_api.c: fix module reference leak on module load

From: Patrick McHardy <[email-masked]>
Date: Wed, 19 Jan 2005 05:38:44 +0100

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/01/19 03:58:05+01:00 [email-masked] 
#   [PKT_SCHED]: cls_api.c: fix module reference leak on module load
#   
#   Signed-off-by: Patrick McHardy <[email-masked]>
# 
# net/sched/cls_api.c
#   2005/01/19 03:57:58+01:00 [email-masked] +3 -1
#   [PKT_SCHED]: cls_api.c: fix module reference leak on module load
#   
#   Signed-off-by: Patrick McHardy <[email-masked]>
# 
diff -Nru a/net/sched/cls_api.c b/net/sched/cls_api.c
--- a/net/sched/cls_api.c	2005-01-19 05:29:50 +01:00
+++ b/net/sched/cls_api.c	2005-01-19 05:29:50 +01:00
@@ -239,8 +239,10 @@
 				 * replay the request.  We indicate this using
 				 * -EAGAIN.
 				 */
-				if (tp_ops != NULL)
+				if (tp_ops != NULL) {
+					module_put(tp_ops->owner);
 					err = -EAGAIN;
+				}
 			}
 #endif
 			kfree(tp);