Remove a redundant TALLOC_FREE
[jra/samba/.git] / source / modules / vfs_aio_fork.c
index 21f63d0b87b3478cb4c8eeecfb9262270f601ca5..7914e8f4014519e8392c7eca6ed755746005d34f 100644 (file)
@@ -56,6 +56,8 @@ static struct mmap_area *mmap_area_init(TALLOC_CTX *mem_ctx, size_t size)
                goto fail;
        }
 
+       close(fd);
+
        result->size = size;
        talloc_set_destructor(result, mmap_area_destructor);
 
@@ -434,7 +436,6 @@ static NTSTATUS create_aio_child(struct aio_child_list *children,
        if (socketpair(AF_UNIX, SOCK_STREAM, 0, fdpair) == -1) {
                status = map_nt_error_from_unix(errno);
                DEBUG(10, ("socketpair() failed: %s\n", strerror(errno)));
-               TALLOC_FREE(result);
                goto fail;
        }