diff options
Diffstat (limited to 'net/sched/em_meta.c')
-rw-r--r-- | net/sched/em_meta.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 2a7e648fbcf4..d417ec8e3ca3 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -735,11 +735,13 @@ static int em_meta_match(struct sk_buff *skb, struct tcf_ematch *m, | |||
735 | 735 | ||
736 | static inline void meta_delete(struct meta_match *meta) | 736 | static inline void meta_delete(struct meta_match *meta) |
737 | { | 737 | { |
738 | struct meta_type_ops *ops = meta_type_ops(&meta->lvalue); | 738 | if (meta) { |
739 | struct meta_type_ops *ops = meta_type_ops(&meta->lvalue); | ||
739 | 740 | ||
740 | if (ops && ops->destroy) { | 741 | if (ops && ops->destroy) { |
741 | ops->destroy(&meta->lvalue); | 742 | ops->destroy(&meta->lvalue); |
742 | ops->destroy(&meta->rvalue); | 743 | ops->destroy(&meta->rvalue); |
744 | } | ||
743 | } | 745 | } |
744 | 746 | ||
745 | kfree(meta); | 747 | kfree(meta); |