From: Volker Lendecke Date: Mon, 16 Oct 2017 15:43:09 +0000 (+0200) Subject: vfs_catia: Fix a potential memleak X-Git-Tag: tevent-0.9.34~192 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f6d6af3b2d5efcd160c1e5e09778fb1129530be0;p=thirdparty%2Fsamba.git vfs_catia: Fix a potential memleak Together with the previous commit this fixes a memleak (twice) that happens when vfs_catia is loaded with no mappings defined. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13090 Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Tue Oct 17 18:53:48 CEST 2017 on sn-devel-144 --- diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index 878cd5ad05c..4088affc089 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -141,7 +141,7 @@ static NTSTATUS catia_string_replace_allocate(connection_struct *conn, if (!init_mappings(conn, &selected)) { /* No mappings found. Just use the old name */ - *mapped_name = talloc_strdup(NULL, name_in); + *mapped_name = talloc_strdup(talloc_tos(), name_in); if (!*mapped_name) { errno = ENOMEM; return NT_STATUS_NO_MEMORY;