[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Thu Aug 1 16:56:01 UTC 2024


The branch, master has been updated
       via  48963251fb0 s4:torture: Fix memory leak
       via  a1055956979 s4:torture: Remove trailing spaces from smbtorture.c
      from  10e9b858a3f docs: Document parametric form of hide and veto files

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 48963251fb04cce4d081408857c0c3a0f6861f4c
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Aug 1 09:32:49 2024 +0200

    s4:torture: Fix memory leak
    
    Direct leak of 102 byte(s) in 1 object(s) allocated from:
        #0 0x7f35322fc7d7 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69
        #1 0x7f3531e43bc2 in __talloc_with_prefix ../../lib/talloc/talloc.c:783
        #2 0x7f3531e45034 in __talloc ../../lib/talloc/talloc.c:825
        #3 0x7f3531e45034 in __talloc_strlendup ../../lib/talloc/talloc.c:2454
        #4 0x7f3531e45034 in talloc_strdup ../../lib/talloc/talloc.c:2470
        #5 0x7f352f90264b in smbcli_parse_unc ../../source4/libcli/cliconnect.c:269
        #6 0x55fbf83aa207 in torture_parse_target ../../source4/torture/smbtorture.c:192
        #7 0x55fbf83ae031 in main ../../source4/torture/smbtorture.c:744
        #8 0x7f352ca2a1ef in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Thu Aug  1 16:55:43 UTC 2024 on atb-devel-224

commit a1055956979ac5f2101efa9c50c923ef1f270cef
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Aug 1 10:22:38 2024 +0200

    s4:torture: Remove trailing spaces from smbtorture.c
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source4/torture/smbtorture.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index ad1280be7d8..7c5a6f78dbb 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -1,19 +1,19 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    SMB torture tester
    Copyright (C) Andrew Tridgell 1997-2003
    Copyright (C) Jelmer Vernooij 2006-2008
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -73,7 +73,7 @@ static void print_test_list(const struct torture_suite *suite, const char *prefi
 }
 
 static bool run_matching(struct torture_context *torture,
-						 const char *prefix, 
+						 const char *prefix,
 						 const char *expr,
 						 const char **restricted,
 						 struct torture_suite *suite,
@@ -189,7 +189,7 @@ bool torture_parse_target(TALLOC_CTX *ctx,
 	NTSTATUS status;
 
 	/* see if its a RPC transport specifier */
-	if (!smbcli_parse_unc(target, NULL, &host, &share)) {
+	if (!smbcli_parse_unc(target, ctx, &host, &share)) {
 		const char *h;
 
 		status = dcerpc_parse_binding(ctx, target, &binding_struct);
@@ -211,6 +211,9 @@ bool torture_parse_target(TALLOC_CTX *ctx,
 		lpcfg_set_cmdline(lp_ctx, "torture:host", host);
 		lpcfg_set_cmdline(lp_ctx, "torture:share", share);
 		lpcfg_set_cmdline(lp_ctx, "torture:binding", host);
+
+		TALLOC_FREE(host);
+		TALLOC_FREE(share);
 	}
 
 	return true;
@@ -450,7 +453,7 @@ int main(int argc, const char *argv[])
 		 "run async tests", NULL},
 		{"num-async",    0, POPT_ARG_INT,  &torture_numasync,  0,
 		 "number of simultaneous async requests", NULL},
-		{"maximum-runtime", 0, POPT_ARG_INT, &max_runtime, 0, 
+		{"maximum-runtime", 0, POPT_ARG_INT, &max_runtime, 0,
 		 "set maximum time for smbtorture to live", "seconds"},
 		{"extra-user",   0, POPT_ARG_STRING, NULL, OPT_EXTRA_USER,
 		 "extra user credentials", NULL},
@@ -628,16 +631,16 @@ int main(int argc, const char *argv[])
 	if (extra_module != NULL) {
 		init_module_fn fn = load_module(poptGetOptArg(pc), false, NULL);
 
-		if (fn == NULL) 
+		if (fn == NULL)
 			d_printf("Unable to load module from %s\n", poptGetOptArg(pc));
 		else {
 			status = fn(mem_ctx);
 			if (NT_STATUS_IS_ERR(status)) {
-				d_printf("Error initializing module %s: %s\n", 
+				d_printf("Error initializing module %s: %s\n",
 					poptGetOptArg(pc), nt_errstr(status));
 			}
 		}
-	} else { 
+	} else {
 		torture_init(mem_ctx);
 	}
 
@@ -673,7 +676,7 @@ int main(int argc, const char *argv[])
 
 	if (torture_seed == 0) {
 		torture_seed = time(NULL);
-	} 
+	}
 	printf("Using seed %d\n", torture_seed);
 	srandom(torture_seed);
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list