]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph_new: Remove redundant re-intialization to NULL
authorAnoop C S <anoopcs@samba.org>
Mon, 24 Feb 2025 06:24:45 +0000 (11:54 +0530)
committerGünther Deschner <gd@samba.org>
Fri, 7 Mar 2025 17:15:35 +0000 (17:15 +0000)
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 <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/modules/vfs_ceph_new.c

index e705722e820512c6fe36df901fe1712e68e6604f..c3ca24e2fe19ac61d0dae035ed635d8bfc2c047a 100644 (file)
@@ -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)