]> git.ipfire.org Git - pakfire.git/commitdiff
jail: Cleanup if we cannot create an eventfd
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 16 Dec 2024 18:24:08 +0000 (18:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 16 Dec 2024 18:24:08 +0000 (18:24 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/jail.c

index 74989a4e34ffa69f7922e21f77568244880cba3b..e702428ac92b6ea0fa132279bc9e08b27a4c84ee 100644 (file)
@@ -1437,10 +1437,10 @@ static int __pakfire_jail_exec(struct pakfire_jail* jail,
                Setup a file descriptor which can be used to notify the client that the parent
                has completed configuration.
        */
-       ctx.completed_fd = eventfd(0, EFD_CLOEXEC);
+       ctx.completed_fd = r = eventfd(0, EFD_CLOEXEC);
        if (ctx.completed_fd < 0) {
                ERROR(jail->ctx, "eventfd() failed: %m\n");
-               return -1;
+               goto ERROR;
        }
 
        // Setup the PTY