svn commit: samba r2909 - in branches/SAMBA_4_0/source/torture/raw:
.
tridge at samba.org
tridge at samba.org
Mon Oct 11 09:23:19 GMT 2004
Author: tridge
Date: 2004-10-11 09:23:19 +0000 (Mon, 11 Oct 2004)
New Revision: 2909
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/torture/raw&rev=2909&nolog=1
Log:
fix some RAW-SEARCH torture mem leaks
Modified:
branches/SAMBA_4_0/source/torture/raw/search.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/search.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/search.c 2004-10-11 09:21:12 UTC (rev 2908)
+++ branches/SAMBA_4_0/source/torture/raw/search.c 2004-10-11 09:23:19 UTC (rev 2909)
@@ -629,7 +629,7 @@
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 @@
}
free(fname);
}
- talloc_free(result.list);
+ talloc_free(result.mem_ctx);
}
done:
@@ -705,7 +705,7 @@
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 @@
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 @@
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;
More information about the samba-cvs
mailing list