]> 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)
committerJule Anger <janger@samba.org>
Thu, 13 Mar 2025 16:03:20 +0000 (16:03 +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>
(cherry picked from commit c5ddd94a08503a52914ce351ebf1083178e8c8bc)

source3/modules/vfs_ceph_new.c

index 08698d271e29183d3f8e4f72469c94d1c2abff69..2d3533feaa5b74260a467d2639ed115b25e91edb 100644 (file)
@@ -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)