diff options
Diffstat (limited to 'net/decnet/dn_rules.c')
-rw-r--r-- | net/decnet/dn_rules.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index 22f321d9bf9d..6986be754ef2 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c | |||
@@ -151,10 +151,9 @@ int dn_fib_rtm_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | new_r = kmalloc(sizeof(*new_r), GFP_KERNEL); | 154 | new_r = kzalloc(sizeof(*new_r), GFP_KERNEL); |
155 | if (!new_r) | 155 | if (!new_r) |
156 | return -ENOMEM; | 156 | return -ENOMEM; |
157 | memset(new_r, 0, sizeof(*new_r)); | ||
158 | 157 | ||
159 | if (rta[RTA_SRC-1]) | 158 | if (rta[RTA_SRC-1]) |
160 | memcpy(&new_r->r_src, RTA_DATA(rta[RTA_SRC-1]), 2); | 159 | memcpy(&new_r->r_src, RTA_DATA(rta[RTA_SRC-1]), 2); |