Add NULL pointer check for consistency
Most other functions in this module have a similar check.
This commit is contained in:
parent
78d7e8cbc7
commit
c8c12b6007
1 changed files with 2 additions and 2 deletions
|
@ -206,8 +206,8 @@ static inline int pk_hashlen_helper( mbedtls_md_type_t md_alg, size_t *hash_len
|
||||||
static int pk_restart_setup( mbedtls_pk_restart_ctx *ctx,
|
static int pk_restart_setup( mbedtls_pk_restart_ctx *ctx,
|
||||||
const mbedtls_pk_info_t *info )
|
const mbedtls_pk_info_t *info )
|
||||||
{
|
{
|
||||||
/* Don't do anything it already set up */
|
/* Don't do anything if already set up or invalid */
|
||||||
if( ctx->pk_info != NULL )
|
if( ctx == NULL || ctx->pk_info != NULL )
|
||||||
return( 0 );
|
return( 0 );
|
||||||
|
|
||||||
/* Should never happen when we're called */
|
/* Should never happen when we're called */
|
||||||
|
|
Loading…
Reference in a new issue