Whamcloud - gitweb
LU-18141 ptlrpc: don't check for NULL before free'ing 46/56046/2
authorTimothy Day <timday@amazon.com>
Wed, 14 Aug 2024 05:01:44 +0000 (01:01 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 22:08:17 +0000 (22:08 +0000)
commit307f98e21fdcb376585f8db76e4d3727f1fa7a1a
tree7150d5ff99c374b8eee5cf623f9f31e95a1225ad
parent8fb94c0a644a0f78e980d520a03d4b6fd95d07c2
LU-18141 ptlrpc: don't check for NULL before free'ing

The common free'ing macros already check for NULL,
so we don't need to explicitly check this beforehand.

The patch has been generated with the coccinelle script below.

@@
expression E;
@@
- if (E != NULL)
(
  OBD_FREE_PTR(E);
|
  OBD_FREE(E, ...);
|
  LIBCFS_FREE(E, ...);
|
  CFS_FREE_PTR(E);
|
  CFS_FREE_PTR_ARRAY(E, ...);
)

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ia436882262a14fda2486b36999c2189f976b047a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56046
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/lproc_ptlrpc.c
lustre/ptlrpc/nrs_tbf.c
lustre/ptlrpc/sec_plain.c