summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-11 09:23:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:47 -0500
commitfea05710342927f321292072c5af4138e477fe76 (patch)
treefb5192c6f6e6dc7264e12eb048730338b824bd96 /source4
parent2d2f43c93963a6dbdc01bd5efaa07841fb22eb54 (diff)
downloadsamba-fea05710342927f321292072c5af4138e477fe76.tar.gz
samba-fea05710342927f321292072c5af4138e477fe76.tar.bz2
samba-fea05710342927f321292072c5af4138e477fe76.zip
r2909: fix some RAW-SEARCH torture mem leaks
(This used to be commit 75ca5ba5091c9046159531b917ff17a519013556)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/raw/search.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index e5c682575c..2d73c8e34e 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -629,7 +629,7 @@ static BOOL test_many_files(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
for (t=0;t<ARRAY_SIZE(search_types);t++) {
ZERO_STRUCT(result);
- result.mem_ctx = mem_ctx;
+ result.mem_ctx = talloc(mem_ctx, 0);
printf("Continue %s via %s\n", search_types[t].name, search_types[t].cont_name);
@@ -683,7 +683,7 @@ static BOOL test_many_files(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
free(fname);
}
- talloc_free(result.list);
+ talloc_free(result.mem_ctx);
}
done:
@@ -705,7 +705,7 @@ static BOOL check_result(struct multiple_result *result, const char *name, BOOL
if (i == result->count) {
if (exist) {
printf("failed: '%s' should exist with attribute %s\n",
- name, attrib_string(NULL, attrib));
+ name, attrib_string(result->list, attrib));
return False;
}
return True;
@@ -713,7 +713,7 @@ static BOOL check_result(struct multiple_result *result, const char *name, BOOL
if (!exist) {
printf("failed: '%s' should NOT exist (has attribute %s)\n",
- name, attrib_string(NULL, result->list[i].both_directory_info.attrib));
+ name, attrib_string(result->list, result->list[i].both_directory_info.attrib));
return False;
}
@@ -763,6 +763,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("pulling the first 10 files\n");
ZERO_STRUCT(result);
+ result.mem_ctx = talloc(mem_ctx, 0);
io.generic.level = RAW_SEARCH_BOTH_DIRECTORY_INFO;
io.t2ffirst.in.search_attrib = 0;