DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH 1/2] nullfree: add matches for null free cases from OpenSSL
Date: Thu,  2 Nov 2023 16:02:05 -0700	[thread overview]
Message-ID: <20231102230307.6138-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20231102230307.6138-1-stephen@networkplumber.org>

OpenSSL functions follow the design parameter that free
of NULL is ok.

Signed-off-by: Stephen Hemminger <stephen@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


  reply	other threads:[~2023-11-02 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 23:02 [PATCH 0/2] remove unnecessary null checks in OpenSSL usage Stephen Hemminger
2023-11-02 23:02 ` Stephen Hemminger [this message]
2023-11-02 23:02 ` [PATCH 2/2] crypto/openssl: remove unnecessary NULL checks before free Stephen Hemminger
2023-11-07 14:12   ` Ji, Kai
2023-11-09 20:12 ` [EXT] [PATCH 0/2] remove unnecessary null checks in OpenSSL usage Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231102230307.6138-2-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).