瀏覽代碼

[PKT_SCHED] ematch: Fix build warning.

Commit 954415e33ed6cfa932c13e8c2460bd05e50723b5 ("[PKT_SCHED] ematch:
tcf_em_destroy robustness") removed a cast on em->data when
passing it to kfree(), but em->data is an integer type that can
hold pointers as well as other values so the cast is necessary.

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 17 年之前
父節點
當前提交
30ddb159ff
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/sched/ematch.c

+ 1 - 1
net/sched/ematch.c

@@ -410,7 +410,7 @@ void tcf_em_tree_destroy(struct tcf_proto *tp, struct tcf_ematch_tree *tree)
 			if (em->ops->destroy)
 				em->ops->destroy(tp, em);
 			else if (!tcf_em_is_simple(em))
-				kfree(em->data);
+				kfree((void *) em->data);
 			module_put(em->ops->owner);
 		}
 	}