Whamcloud - gitweb
LU-18141 llite: don't check for NULL before free'ing 41/56041/2
authorTimothy Day <timday@amazon.com>
Wed, 14 Aug 2024 04:55:45 +0000 (00:55 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 22:07:23 +0000 (22:07 +0000)
commit116907709054af605a473c9f0231d3151a8cb69f
tree2a832674369e73874557b4f4c69ba9743e3bcc34
parentd0c711ff147ee8ee643f98eb3960aaac1748ba66
LU-18141 llite: 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: I0a476b17986b9346f07c2f854bb6b60f0f251c87
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56041
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/crypto.c
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/llite_foreign_symlink.c
lustre/llite/llite_lib.c
lustre/llite/namei.c
lustre/llite/pcc.c