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

@@ -252,10 +252,8 @@ static int util_verbose(ENGINE *e, int verbose, BIO *out, const char *indent)
}
OPENSSL_free(name);
name = NULL;
if (desc) {
OPENSSL_free(desc);
desc = NULL;
}
OPENSSL_free(desc);
desc = NULL;
/* Move to the next command */
num = ENGINE_ctrl(e, ENGINE_CTRL_GET_NEXT_CMD_TYPE, num, NULL, NULL);
} while (num > 0);
@@ -265,10 +263,8 @@ static int util_verbose(ENGINE *e, int verbose, BIO *out, const char *indent)
err:
if (cmds)
sk_OPENSSL_STRING_pop_free(cmds, identity);
if (name)
OPENSSL_free(name);
if (desc)
OPENSSL_free(desc);
OPENSSL_free(name);
OPENSSL_free(desc);
return ret;
}