diff options
author | NeilBrown <neilb@suse.de> | 2010-08-09 20:02:33 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-08-09 20:02:33 -0400 |
commit | fd8aa2c1811bf60ccb2d5de0579c6f62aec1772d (patch) | |
tree | 311567d03758afc3a93b4273fe172836e89bb01d /net/sched/act_simple.c | |
parent | 6e17b0276452912cb13445e5ea552b599984675f (diff) | |
parent | 2144381da478cc4aa3a29ee29b0c5e6ddaaced14 (diff) |
Merge git://git.infradead.org/users/dwmw2/libraid-2.6 into for-linus
Diffstat (limited to 'net/sched/act_simple.c')
-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 | ||