[PATCH] crypto/ccp: Check for the NULL pointer after calling rte_malloc

Stephen Hemminger stephen at networkplumber.org
Wed Jul 20 17:42:04 CEST 2022


On Wed, 20 Jul 2022 06:29:06 +0000
"Namburu, Chandu-babu" <chandu at amd.com> wrote:

>  	sha_ctx = (void *)rte_malloc(NULL, SHA512_DIGEST_SIZE, 64);
> +	if (sha_ctx == NULL) {
> +		return -ENOMEM;
> +	}

There is unnecessary cast here (pre-existing).

rte_malloc() already returns void *


More information about the dev mailing list