s3: Save errno around a TALLOC_FREE
authorVolker Lendecke <vl@samba.org>
Mon, 11 Jun 2012 09:00:27 +0000 (11:00 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 11 Jun 2012 21:54:37 +0000 (14:54 -0700)
Signed-off-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_aio_fork.c

index f68befbf31e4d6d83b2a261fb512dc314c8f2c11..cc13a9bd1cd7cee5d0f7015d337fcdf1b6b187e4 100644 (file)
@@ -794,6 +794,7 @@ static int aio_fork_suspend(struct vfs_handle_struct *handle,
        int i;
        int ret = -1;
        bool timed_out = false;
+       int err;
 
        children = init_aio_children(handle);
        if (children == NULL) {
@@ -885,7 +886,9 @@ static int aio_fork_suspend(struct vfs_handle_struct *handle,
 
   out:
 
+       err = errno;
        TALLOC_FREE(frame);
+       errno = err;
        return ret;
 }