int err;
err = -ENOMEM;
- fl = kzalloc(sizeof(*fl), GFP_KERNEL);
+ fl = kmalloc(sizeof(*fl), GFP_KERNEL);
if (fl == NULL)
goto done;
+ memset(fl, 0, sizeof(*fl));
olen = optlen - CMSG_ALIGN(sizeof(*freq));
if (olen > 0) {
while (!fl) {
if (++state->bucket <= FL_HASH_MASK)
fl = fl_ht[state->bucket];
+ else
+ break;
}
return fl;
}
{
struct seq_file *seq;
int rc = -ENOMEM;
- struct ip6fl_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL);
+ struct ip6fl_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
seq = file->private_data;
seq->private = s;
+ memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree: