summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-30 19:35:25 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-30 13:08:28 +0200
commit2d8b6ce1c112731de7e2ed89ee19864f2631883d (patch)
treeff4f6131daef018f37261434e62b01e708bfd093 /source4/libnet
parentbe8180e030ec922ae75b747c2bf4c5551740c404 (diff)
downloadsamba-2d8b6ce1c112731de7e2ed89ee19864f2631883d.tar.gz
samba-2d8b6ce1c112731de7e2ed89ee19864f2631883d.tar.bz2
samba-2d8b6ce1c112731de7e2ed89ee19864f2631883d.zip
s4-libnet: Add mem_ctx to libnet_Lookup calls (bug #8889)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_lookup.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c
index f9379405d0..f5e084f6ef 100644
--- a/source4/libnet/libnet_lookup.c
+++ b/source4/libnet/libnet_lookup.c
@@ -47,6 +47,7 @@ static void continue_name_resolved(struct composite_context *ctx);
*/
struct composite_context *libnet_Lookup_send(struct libnet_context *ctx,
+ TALLOC_CTX *mem_ctx,
struct libnet_Lookup *io)
{
struct composite_context *c;
@@ -55,7 +56,7 @@ struct composite_context *libnet_Lookup_send(struct libnet_context *ctx,
struct resolve_context *resolve_ctx;
/* allocate context and state structures */
- c = composite_create(ctx, ctx->event_ctx);
+ c = composite_create(mem_ctx, ctx->event_ctx);
if (c == NULL) return NULL;
s = talloc_zero(c, struct lookup_state);
@@ -144,7 +145,7 @@ NTSTATUS libnet_Lookup_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
NTSTATUS libnet_Lookup(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
struct libnet_Lookup *io)
{
- struct composite_context *c = libnet_Lookup_send(ctx, io);
+ struct composite_context *c = libnet_Lookup_send(ctx, mem_ctx, io);
return libnet_Lookup_recv(c, mem_ctx, io);
}
@@ -159,10 +160,11 @@ NTSTATUS libnet_Lookup(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
* Sends asynchronous LookupHost request
*/
struct composite_context* libnet_LookupHost_send(struct libnet_context *ctx,
+ TALLOC_CTX *mem_ctx,
struct libnet_Lookup *io)
{
io->in.type = NBT_NAME_SERVER;
- return libnet_Lookup_send(ctx, io);
+ return libnet_Lookup_send(ctx, mem_ctx, io);
}
@@ -173,7 +175,7 @@ struct composite_context* libnet_LookupHost_send(struct libnet_context *ctx,
NTSTATUS libnet_LookupHost(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
struct libnet_Lookup *io)
{
- struct composite_context *c = libnet_LookupHost_send(ctx, io);
+ struct composite_context *c = libnet_LookupHost_send(ctx, mem_ctx, io);
return libnet_Lookup_recv(c, mem_ctx, io);
}