From: Swen Schillig Date: Wed, 22 Jan 2020 10:55:46 +0000 (+0100) Subject: [s4] possible memleak in torture vfs-fruit X-Git-Tag: ldb-2.2.0~1517 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d784590a9cf36d404f65a17dbb94c4878722741;p=thirdparty%2Fsamba.git [s4] possible memleak in torture vfs-fruit The allocated memory for "full_name" must be free'd before returning to caller. Signed-off-by: Swen Schillig Reviewed-by: Ralph Boehme Reviewed-by: David Disseldorp Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Wed Mar 4 10:43:54 UTC 2020 on sn-devel-184 --- diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c index 94cbf277677..01d2890e17d 100644 --- a/source4/torture/vfs/fruit.c +++ b/source4/torture/vfs/fruit.c @@ -1824,6 +1824,7 @@ static bool check_stream(struct smb2_tree *tree, status = smb2_create(tree, mem_ctx, &create); if (!NT_STATUS_IS_OK(status)) { if (value == NULL) { + TALLOC_FREE(full_name); return true; } torture_comment(tctx, "Unable to open stream %s\n", full_name);