Whamcloud - gitweb
LU-18141 obdclass: don't check for NULL before free'ing 42/56042/3
authorTimothy Day <timday@amazon.com>
Wed, 14 Aug 2024 04:56:29 +0000 (00:56 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 12 Sep 2024 05:52:59 +0000 (05:52 +0000)
commitffe9424e4274d310104bd5fe68dc5a694c3e81df
tree2132f99c536b7399e8cdb426d2270eebfa9011ee
parentccfe0195b3b47b2b0091ebd845efff3b22d89e14
LU-18141 obdclass: 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: Ie5d5567fecc1f421fb0894816c880b41ea93843b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56042
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/llog_osd.c
lustre/obdclass/lprocfs_status_server.c
lustre/obdclass/lu_tgt_descs.c
lustre/obdclass/obd_config.c
lustre/obdclass/obd_mount.c