s3: Actually use mem_ctx in net_g_lock_init()
authorVolker Lendecke <vl@samba.org>
Fri, 12 Mar 2010 11:12:25 +0000 (12:12 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 12 Mar 2010 11:12:42 +0000 (12:12 +0100)
source3/utils/net_g_lock.c

index 7632302cea9aa4a3e09feeaaa09bc0130c8a9530..54cb2d439e8c12d99844445c827ee1db9163b677 100644 (file)
@@ -30,17 +30,17 @@ static bool net_g_lock_init(TALLOC_CTX *mem_ctx,
        struct messaging_context *msg = NULL;
        struct g_lock_ctx *g_ctx = NULL;
 
-       ev = tevent_context_init(talloc_tos());
+       ev = tevent_context_init(mem_ctx);
        if (ev == NULL) {
                d_fprintf(stderr, "ERROR: could not init event context\n");
                goto fail;
        }
-       msg = messaging_init(talloc_tos(), procid_self(), ev);
+       msg = messaging_init(mem_ctx, procid_self(), ev);
        if (msg == NULL) {
                d_fprintf(stderr, "ERROR: could not init messaging context\n");
                goto fail;
        }
-       g_ctx = g_lock_ctx_init(talloc_tos(), msg);
+       g_ctx = g_lock_ctx_init(mem_ctx, msg);
        if (g_ctx == NULL) {
                d_fprintf(stderr, "ERROR: could not init g_lock context\n");
                goto fail;