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: tevent-0.17.0~584 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5ddd94a08503a52914ce351ebf1083178e8c8bc;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 --- diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index e705722e820..c3ca24e2fe1 100644 --- a/source3/modules/vfs_ceph_new.c +++ b/source3/modules/vfs_ceph_new.c @@ -701,10 +701,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)