aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/filter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 1f0068eae501..e0a06942c025 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -447,7 +447,8 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
447 rcu_assign_pointer(sk->sk_filter, fp); 447 rcu_assign_pointer(sk->sk_filter, fp);
448 rcu_read_unlock_bh(); 448 rcu_read_unlock_bh();
449 449
450 sk_filter_delayed_uncharge(sk, old_fp); 450 if (old_fp)
451 sk_filter_delayed_uncharge(sk, old_fp);
451 return 0; 452 return 0;
452} 453}
453 454