Whamcloud - gitweb
LU-18141 target: don't check for NULL before free'ing 33/56033/2
authorTimothy Day <timday@amazon.com>
Wed, 14 Aug 2024 04:54:24 +0000 (00:54 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 22:07:05 +0000 (22:07 +0000)
commit79961c34613fed9e8a0402f06d464ad63ba13a6f
tree78272d1b66f3ce8dd57c7593d99dfabcda9e61db
parentb3254fd8f8bcff69bfa5b173588119485f5d9aad
LU-18141 target: 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: Ifbdc95bf18855892afa4e066b654da62cdee5e13
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56033
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/target/out_handler.c
lustre/target/out_lib.c
lustre/target/tgt_lastrcvd.c
lustre/target/tgt_main.c
lustre/target/tgt_mount.c
lustre/target/update_records.c