vfs_preopen: TALLOC_FREE(fde) before closing the underlying fd
authorVolker Lendecke <vl@samba.org>
Wed, 26 Jun 2019 15:43:44 +0000 (17:43 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 28 Jun 2019 16:42:42 +0000 (16:42 +0000)
Without that we might get wrong stuff out of epoll

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jun 28 16:42:42 UTC 2019 on sn-devel-184

source3/modules/vfs_preopen.c

index 6a1ccbd6f04a7c9248e2a05ead6da93f1a4a1d14..a2afbf179f89c8c2d1f3e51016fb2c3848628780 100644 (file)
@@ -57,6 +57,7 @@ struct preopen_state {
 static void preopen_helper_destroy(struct preopen_helper *c)
 {
        int status;
+       TALLOC_FREE(c->fde);
        close(c->fd);
        c->fd = -1;
        kill(c->pid, SIGKILL);