]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph_rgw: Fix config memory leak on load failure
authorAnoop C S <anoopcs@samba.org>
Thu, 25 Jun 2026 06:21:53 +0000 (11:51 +0530)
committerGünther Deschner <gd@samba.org>
Thu, 25 Jun 2026 13:13:01 +0000 (13:13 +0000)
Free config_tmp when vfs_ceph_rgw_load_config() fails after allocation.

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/modules/vfs_ceph_rgw.c

index 0307de25fb78893533b5709685fe6b8d8db6286f..88146591dd22b8549bd175d0502c1bcf95a89aa2 100644 (file)
@@ -2260,6 +2260,9 @@ static bool vfs_ceph_rgw_load_config(struct vfs_handle_struct *handle,
        *config = config_tmp;
        ret = true;
 out:
+       if (!ret) {
+               TALLOC_FREE(config_tmp);
+       }
        return ret;
 }