提交 3e75a902 编写于 作者: J Johannes Weiner 提交者: Martin Schwidefsky

[S390] 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: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 6aa0d3a9
......@@ -201,8 +201,7 @@ static int __init prng_init(void)
static void __exit prng_exit(void)
{
/* wipe me */
memset(p->buf, 0, prng_chunk_size);
kfree(p->buf);
kzfree(p->buf);
kfree(p);
misc_deregister(&prng_dev);
......
......@@ -781,8 +781,7 @@ static long zcrypt_pcixcc_send_cprb(struct zcrypt_device *zdev,
/* Signal pending. */
ap_cancel_message(zdev->ap_dev, &ap_msg);
out_free:
memset(ap_msg.message, 0x0, ap_msg.length);
kfree(ap_msg.message);
kzfree(ap_msg.message);
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册