提交 31dbb803 编写于 作者: J Johannes Weiner 提交者: Greg Kroah-Hartman

USB: use kzfree()

Use kzfree() instead of memset() + kfree().
Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
Reviewed-by: NPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 d34d9721
......@@ -464,8 +464,7 @@ static int __hwahc_dev_set_key(struct wusbhc *wusbhc, u8 port_idx, u32 tkid,
port_idx << 8 | iface_no,
keyd, keyd_len, 1000 /* FIXME: arbitrary */);
memset(keyd, 0, sizeof(*keyd)); /* clear keys etc. */
kfree(keyd);
kzfree(keyd); /* clear keys etc. */
return result;
}
......
......@@ -638,8 +638,7 @@ static void cbaf_disconnect(struct usb_interface *iface)
usb_put_intf(iface);
kfree(cbaf->buffer);
/* paranoia: clean up crypto keys */
memset(cbaf, 0, sizeof(*cbaf));
kfree(cbaf);
kzfree(cbaf);
}
static struct usb_device_id cbaf_id_table[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册