From 08f2d5abca6b44c5cae1e476a591495ce76a3179 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Mon, 24 Feb 2025 11:54:45 +0530 Subject: [PATCH] vfs_ceph_new: Remove redundant re-intialization to NULL TALLOC_FREE() by default re-initializes the pointer to NULL after corresponding memory is freed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15818 Signed-off-by: Anoop C S Reviewed-by: Guenther Deschner (cherry picked from commit c5ddd94a08503a52914ce351ebf1083178e8c8bc) --- source3/modules/vfs_ceph_new.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index 1f9d9b4c3b0..706e6d21e1d 100644 --- a/source3/modules/vfs_ceph_new.c +++ b/source3/modules/vfs_ceph_new.c @@ -707,10 +707,7 @@ static struct dirent *vfs_ceph_get_fh_dirent(struct vfs_ceph_fh *cfh) static void vfs_ceph_put_fh_dirent(struct vfs_ceph_fh *cfh) { - if (cfh->de != NULL) { - TALLOC_FREE(cfh->de); - cfh->de = NULL; - } + TALLOC_FREE(cfh->de); } static int vfs_ceph_release_fh(struct vfs_ceph_fh *cfh) -- 2.47.2