From: Ralph Boehme Date: Fri, 3 Nov 2017 13:56:43 +0000 (+0100) Subject: vfs_fruit: avoid dereferencing a freed object in an error case X-Git-Tag: tevent-0.9.34~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3bb854ce90f86aa1b7e62ed824ce2f9d385cd5d4;p=thirdparty%2Fsamba.git vfs_fruit: avoid dereferencing a freed object in an error case Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Fri Nov 3 19:05:05 CET 2017 on sn-devel-144 --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index b0dd0f062bd..78170e7abdd 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -3776,11 +3776,11 @@ static int fruit_rmdir(struct vfs_handle_struct *handle, TALLOC_FREE(ad); ret = SMB_VFS_NEXT_UNLINK(handle, ad_smb_fname); - TALLOC_FREE(ad_smb_fname); if (ret != 0) { DBG_ERR("Deleting [%s] failed\n", smb_fname_str_dbg(ad_smb_fname)); } + TALLOC_FREE(ad_smb_fname); } exit_rmdir: