Staging: rtl8723bs: Use kzfree rather than its implementation
authorzhong jiang <zhongjiang@huawei.com>
Wed, 4 Sep 2019 03:01:19 +0000 (11:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Sep 2019 06:25:22 +0000 (08:25 +0200)
Use kzfree instead of memset() + kfree().

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Link: https://lore.kernel.org/r/1567566079-7412-4-git-send-email-zhongjiang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_security.c

index 979056c..57cfe06 100644 (file)
@@ -2290,8 +2290,7 @@ static void gf_mulx(u8 *pad)
 
 static void aes_encrypt_deinit(void *ctx)
 {
-       memset(ctx, 0, AES_PRIV_SIZE);
-       kfree(ctx);
+       kzfree(ctx);
 }