OpenSSL functions follow the design parameter that free of NULL is ok. Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- devtools/cocci/nullfree.cocci | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/devtools/cocci/nullfree.cocci b/devtools/cocci/nullfree.cocci index 9ca3fc2864..c58aad4fb7 100644 --- a/devtools/cocci/nullfree.cocci +++ b/devtools/cocci/nullfree.cocci @@ -126,4 +126,13 @@ expression E; | - if (E != NULL) trie_free(E); + trie_free(E); +| +- if (E != NULL) EVP_PKEY_CTX_free(E); ++ EVP_PKEY_CTX_free(E); +| +- if (E != NULL) EVP_PKEY_free(E); ++ EVP_PKEY_free(E); +| +- if (E != NULL) BN_free(E); ++ BN_free(E); ) -- 2.41.0