]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
fixed crash bug - thanks volker
authorAndrew Tridgell <tridge@samba.org>
Mon, 16 Apr 2007 23:10:52 +0000 (09:10 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 16 Apr 2007 23:10:52 +0000 (09:10 +1000)
(This used to be ctdb commit e293f6fadf673d8bc7203198d709bcb28c26b482)

ctdb/common/ctdb_lockwait.c

index 11d9cd37818ee49b64970c25dde06cf6434a50b8..6d733155e4a130ffa5ae3b4e26e20816472a10e5 100644 (file)
@@ -43,11 +43,12 @@ static void lockwait_handler(struct event_context *ev, struct fd_event *fde,
                                                     struct lockwait_handle);
        void (*callback)(void *) = h->callback;
        void *p = h->private_data;
+       pid_t child = h->child;
        talloc_set_destructor(h, NULL);
        close(h->fd[0]);
        talloc_free(h); 
        callback(p);
-       waitpid(h->child, NULL, 0);
+       waitpid(child, NULL, 0);
 }
 
 static int lockwait_destructor(struct lockwait_handle *h)