From: Andrew Tridgell Date: Mon, 16 Apr 2007 23:10:52 +0000 (+1000) Subject: fixed crash bug - thanks volker X-Git-Tag: tevent-0.9.20~348^2~2913 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7db4320e84bae58abc4e2fe7549c821d3b564aed;p=thirdparty%2Fsamba.git fixed crash bug - thanks volker (This used to be ctdb commit e293f6fadf673d8bc7203198d709bcb28c26b482) --- diff --git a/ctdb/common/ctdb_lockwait.c b/ctdb/common/ctdb_lockwait.c index 11d9cd37818..6d733155e4a 100644 --- a/ctdb/common/ctdb_lockwait.c +++ b/ctdb/common/ctdb_lockwait.c @@ -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)