mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
USB: use kzfree()
Use kzfree() instead of memset() + kfree(). Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
d34d9721a5
commit
31dbb80346
2 changed files with 2 additions and 4 deletions
|
@ -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[] = {
|
||||
|
|
Loading…
Reference in a new issue