svn commit: samba r17939 - in
branches/SAMBA_4_0/source/torture/libnet: .
mimir at samba.org
mimir at samba.org
Wed Aug 30 22:06:00 GMT 2006
Author: mimir
Date: 2006-08-30 22:05:59 +0000 (Wed, 30 Aug 2006)
New Revision: 17939
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17939
Log:
Fix compiler warnings spotted on buildfarm.
rafal
Modified:
branches/SAMBA_4_0/source/torture/libnet/libnet_user.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_user.c
===================================================================
--- branches/SAMBA_4_0/source/torture/libnet/libnet_user.c 2006-08-30 20:48:06 UTC (rev 17938)
+++ branches/SAMBA_4_0/source/torture/libnet/libnet_user.c 2006-08-30 22:05:59 UTC (rev 17939)
@@ -281,12 +281,13 @@
status = libnet_DeleteUser(ctx, mem_ctx, &req);
if (!NT_STATUS_IS_OK(status)) {
printf("libnet_DeleteUser call failed: %s\n", nt_errstr(status));
- return False;
+ ret = False;
}
+ talloc_free(mem_ctx);
+
done:
talloc_free(prep_mem_ctx);
- talloc_free(mem_ctx);
return ret;
}
@@ -429,6 +430,9 @@
r->in.last_password_change = talloc_memdup(mem_ctx, &now, sizeof(now));
fldname = "last_password_change";
break;
+
+ default:
+ fldname = "unknown_field";
}
printf(((i < num_changes - 1) ? "%s," : "%s"), fldname);
@@ -496,17 +500,20 @@
status = libnet_ModifyUser(ctx, mem_ctx, &req);
if (!NT_STATUS_IS_OK(status)) {
printf("libnet_ModifyUser call failed: %s\n", nt_errstr(status));
- return False;
+ talloc_free(mem_ctx);
+ ret = False;
+ goto done;
}
if (!test_cleanup(ctx->samr.pipe, mem_ctx, &ctx->samr.handle, TEST_USERNAME)) {
printf("cleanup failed\n");
- return False;
+ ret = False;
}
+ talloc_free(mem_ctx);
+
done:
talloc_free(prep_mem_ctx);
- talloc_free(mem_ctx);
return ret;
}
@@ -524,7 +531,7 @@
struct lsa_String domain_name;
struct libnet_UserInfo req;
- prep_mem_ctx = talloc_init("torture user info");
+ prep_mem_ctx = talloc_init("prepare torture user info");
binding = lp_parm_string(-1, "torture", "binding");
ctx = libnet_context_init(NULL);
@@ -548,6 +555,8 @@
goto done;
}
+ mem_ctx = talloc_init("torture user info");
+
ZERO_STRUCT(req);
req.in.domain_name = domain_name.string;
@@ -557,16 +566,18 @@
if (!NT_STATUS_IS_OK(status)) {
printf("libnet_UserInfo call failed: %s\n", nt_errstr(status));
ret = False;
+ talloc_free(mem_ctx);
+ goto done;
}
if (!test_cleanup(ctx->samr.pipe, mem_ctx, &ctx->samr.handle, TEST_USERNAME)) {
printf("cleanup failed\n");
ret = False;
- goto done;
}
+ talloc_free(ctx);
+
done:
- talloc_free(ctx);
talloc_free(mem_ctx);
return ret;
}
More information about the samba-cvs
mailing list