diff options
-rw-r--r-- | net/sched/act_simple.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index 1b4bc691d7d1..4a1d640b0cf1 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c | |||
@@ -73,10 +73,10 @@ static int tcf_simp_release(struct tcf_defact *d, int bind) | |||
73 | 73 | ||
74 | static int alloc_defdata(struct tcf_defact *d, char *defdata) | 74 | static int alloc_defdata(struct tcf_defact *d, char *defdata) |
75 | { | 75 | { |
76 | d->tcfd_defdata = kstrndup(defdata, SIMP_MAX_DATA, GFP_KERNEL); | 76 | d->tcfd_defdata = kzalloc(SIMP_MAX_DATA, GFP_KERNEL); |
77 | if (unlikely(!d->tcfd_defdata)) | 77 | if (unlikely(!d->tcfd_defdata)) |
78 | return -ENOMEM; | 78 | return -ENOMEM; |
79 | 79 | strlcpy(d->tcfd_defdata, defdata, SIMP_MAX_DATA); | |
80 | return 0; | 80 | return 0; |
81 | } | 81 | } |
82 | 82 | ||