[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-keyrings
Subject:    Re: [PATCH] X.509: Fix error code in x509_cert_parse()
From:       David Howells <dhowells () redhat ! com>
Date:       2017-05-23 16:49:03
Message-ID: 4045.1495558143 () warthog ! procyon ! org ! uk
[Download RAW message or body]

Dan Carpenter <dan.carpenter@oracle.com> wrote:

>  	cert->pub->key = kmemdup(ctx->key, ctx->key_size, GFP_KERNEL);
> -	if (!cert->pub->key)
> +	if (!cert->pub->key) {
> +		ret = -ENOMEM;
>  		goto error_decode;
> +	}

Put the "ret = -ENOMEM" line before the kmemdup line maybe?

David
--
To unsubscribe from this list: send the line "unsubscribe keyrings" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic