s3: Survive an idle child that was killed
authorChristian Ambach <christian.ambach@de.ibm.com>
Wed, 23 Feb 2011 10:10:15 +0000 (11:10 +0100)
committerVolker Lendecke <vlendec@samba.org>
Mon, 28 Feb 2011 13:53:20 +0000 (14:53 +0100)
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Feb 28 14:53:20 CET 2011 on sn-devel-104

source3/modules/vfs_aio_fork.c

index 0cea931a6d5efd88ad0892728bbaf330da47569a..4ddc71ee9d2d711356b96c5409d76282471ae9c0 100644 (file)
@@ -407,6 +407,12 @@ static void handle_aio_completion(struct event_context *event_ctx,
                child->retval.ret_errno = EIO;
        }
 
+       if (child->aiocb == NULL) {
+               DEBUG(1, ("Inactive child died\n"));
+               TALLOC_FREE(child);
+               return;
+       }
+
        if (child->cancelled) {
                child->aiocb = NULL;
                child->cancelled = false;