From: Anoop C S Date: Mon, 24 Feb 2025 06:24:45 +0000 (+0530) Subject: vfs_ceph_new: Remove redundant re-intialization to NULL X-Git-Tag: samba-4.22.1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e9eb916024a61fdebb3aedd10e972ac957cc8c1;p=thirdparty%2Fsamba.git 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) --- diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index 08698d271e2..2d3533feaa5 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)