]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
lib/digsig: remove unnecessary memset
authorLiao Yuanhong <liaoyuanhong@vivo.com>
Mon, 11 Aug 2025 08:27:38 +0000 (16:27 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 14 Sep 2025 00:32:45 +0000 (17:32 -0700)
kzalloc() has already been initialized to full 0 space, there is no need
to use memset() to initialize again.

Link: https://lkml.kernel.org/r/20250811082739.378284-1-liaoyuanhong@vivo.com
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/digsig.c

index 04b5e55ed95f5b3419ad23b6f5ad4984b451303e..2b36f9cc91e908bae087a90fe30f3d54778d75ac 100644 (file)
@@ -159,7 +159,6 @@ static int digsig_verify_rsa(struct key *key,
 
        len = mlen;
        head = len - l;
-       memset(out1, 0, head);
        memcpy(out1 + head, p, l);
 
        kfree(p);