]> git.ipfire.org Git - pakfire.git/commitdiff
pty: Remove closing an unused file descriptor
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2024 16:42:15 +0000 (16:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2024 16:42:15 +0000 (16:42 +0000)
This was never used and not initialized, so it closed standard input.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/pty.c

index 8d8607b108bc940935d3f1214d1792c3f189d587..f23490aa15510b047395d2416b4577ffffcd1b6c 100644 (file)
@@ -102,7 +102,6 @@ struct pakfire_pty {
 
        // Captured Output
        struct iovec output;
-       int outputfd;
 };
 
 static int pakfire_pty_has_flag(struct pakfire_pty* pty, int flag) {
@@ -978,8 +977,6 @@ static void pakfire_pty_free(struct pakfire_pty* pty) {
        // Output
        if (pty->output.iov_base)
                munmap(pty->output.iov_base, pty->output.iov_len);
-       if (pty->outputfd >= 0)
-               close(pty->outputfd);
 
        if (pty->loop)
                sd_event_unref(pty->loop);