瀏覽代碼

crypto: algif - use kmalloc instead of kzalloc

No need to use kzalloc to allocate sgls as the structure is initialized anyway.

Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tadeusz Struk 10 年之前
父節點
當前提交
82d929207a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      crypto/algif_skcipher.c

+ 1 - 1
crypto/algif_skcipher.c

@@ -583,7 +583,7 @@ static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
 			rsgl = &sreq->first_sgl;
 			rsgl = &sreq->first_sgl;
 			list_add_tail(&rsgl->list, &sreq->list);
 			list_add_tail(&rsgl->list, &sreq->list);
 		} else {
 		} else {
-			rsgl = kzalloc(sizeof(*rsgl), GFP_KERNEL);
+			rsgl = kmalloc(sizeof(*rsgl), GFP_KERNEL);
 			if (!rsgl) {
 			if (!rsgl) {
 				err = -ENOMEM;
 				err = -ENOMEM;
 				goto free;
 				goto free;