Whamcloud - gitweb
LU-18141 misc: (for o*) don't check for NULL before free'ing 47/56047/2
authorTimothy Day <timday@amazon.com>
Wed, 14 Aug 2024 05:07:11 +0000 (01:07 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 22:08:27 +0000 (22:08 +0000)
commit4effc77c193dd15b9c440227838fbf3271456a72
tree26f93f68a3858f50afd7e5395d1f979bd6241f36
parent307f98e21fdcb376585f8db76e4d3727f1fa7a1a
LU-18141 misc: (for o*) 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: I6bc5893f9cdbe27eb25507cb214f1dac39f1feec
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56047
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/obdecho/echo_client.c
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_fs.c
lustre/ofd/ofd_lvb.c
lustre/osp/lwp_dev.c
lustre/osp/osp_dev.c
lustre/osp/osp_precreate.c
lustre/osp/osp_sync.c