Skip to contentSkip to conversation

: cls_api.c: fix module reference leak on module load

PATCH In review Patrick McHardy 1 participant 1 message Jan 19, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/4 : cls_api.c: fix module reference leak on module load

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2005/01/19 03:58:05+01:00 [email protected]
# [PKT_SCHED]: cls_api.c: fix module reference leak on module load
#
# Signed-off-by: Patrick McHardy <[email protected]>
#

# net/sched/cls_api.c
#   2005/01/19 03:57:58+01:00 [email protected] +3 -1
#   [PKT_SCHED]: cls_api.c: fix module reference leak on module load
#   
#   Signed-off-by: Patrick McHardy <[email protected]>
# 
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);