diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-07-24 03:38:13 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-24 03:38:13 -0400 |
commit | b71426eb10d904d421b36f51f93c8d0ba558edac (patch) | |
tree | a8c7088a6b89499134e01750652aa55f2baa890f /net/sched/cls_fw.c | |
parent | 8419dc8a34d765f2ff1aa4051084d54cfeff09cf (diff) | |
parent | abb5a5cc6bba1516403146c5b79036fe843beb70 (diff) |
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'net/sched/cls_fw.c')
-rw-r--r-- | net/sched/cls_fw.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index d41de91fc4f6..e6973d9b686d 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c | |||
@@ -267,20 +267,18 @@ static int fw_change(struct tcf_proto *tp, unsigned long base, | |||
267 | return -EINVAL; | 267 | return -EINVAL; |
268 | 268 | ||
269 | if (head == NULL) { | 269 | if (head == NULL) { |
270 | head = kmalloc(sizeof(struct fw_head), GFP_KERNEL); | 270 | head = kzalloc(sizeof(struct fw_head), GFP_KERNEL); |
271 | if (head == NULL) | 271 | if (head == NULL) |
272 | return -ENOBUFS; | 272 | return -ENOBUFS; |
273 | memset(head, 0, sizeof(*head)); | ||
274 | 273 | ||
275 | tcf_tree_lock(tp); | 274 | tcf_tree_lock(tp); |
276 | tp->root = head; | 275 | tp->root = head; |
277 | tcf_tree_unlock(tp); | 276 | tcf_tree_unlock(tp); |
278 | } | 277 | } |
279 | 278 | ||
280 | f = kmalloc(sizeof(struct fw_filter), GFP_KERNEL); | 279 | f = kzalloc(sizeof(struct fw_filter), GFP_KERNEL); |
281 | if (f == NULL) | 280 | if (f == NULL) |
282 | return -ENOBUFS; | 281 | return -ENOBUFS; |
283 | memset(f, 0, sizeof(*f)); | ||
284 | 282 | ||
285 | f->id = handle; | 283 | f->id = handle; |
286 | 284 | ||