diff mbox series

[07/82] examples/l2fwd-cat: remove unnecessary NULL checks

Message ID 20220124000518.319850-8-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series remove unnecessary null checks | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Jan. 24, 2022, 12:04 a.m. UTC
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 examples/l2fwd-cat/cat.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/examples/l2fwd-cat/cat.c b/examples/l2fwd-cat/cat.c
index 502c6b32780e..77154c8b7e61 100644
--- a/examples/l2fwd-cat/cat.c
+++ b/examples/l2fwd-cat/cat.c
@@ -872,8 +872,7 @@  cat_fini(void)
 #if PQOS_VERSION <= 103
 	memset(m_sockets, 0, sizeof(m_sockets));
 #else
-	if (m_sockets != NULL)
-		free(m_sockets);
+	free(m_sockets);
 #endif
 	m_sock_count = 0;
 	memset(m_config, 0, sizeof(m_config));