free null cleanup finale

Don't check for NULL before calling OPENSSL_free

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Rich Salz
2015-05-01 10:02:07 -04:00
parent 33fbca83dc
commit b548a1f11c
173 changed files with 509 additions and 1012 deletions

View File

@@ -167,8 +167,7 @@ _STACK *sk_new(int (*c) (const void *, const void *))
ret->sorted = 0;
return (ret);
err:
if (ret)
OPENSSL_free(ret);
OPENSSL_free(ret);
return (NULL);
}
@@ -318,8 +317,7 @@ void sk_free(_STACK *st)
{
if (st == NULL)
return;
if (st->data != NULL)
OPENSSL_free(st->data);
OPENSSL_free(st->data);
OPENSSL_free(st);
}