]> git.ipfire.org Git - telemetry.git/commitdiff
command: Close the pidfd
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Oct 2025 17:44:23 +0000 (17:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Oct 2025 17:44:23 +0000 (17:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/command.c

index 99b5a869f165a1b500ef1b18ecb366caab8367b7..eb23f2a79175a058e41c3520bd1fa94db377fd3b 100644 (file)
@@ -105,6 +105,10 @@ static void collecty_command_free(collecty_command* self) {
        collecty_command_close_pipe(self->stdout.pipes);
        collecty_command_close_pipe(self->stderr.pipes);
 
+       // Close pidfd
+       if (self->pidfd >= 0)
+               close(self->pidfd);
+
        // Free buffers
        if (self->stdout.buffer)
                collecty_buffer_unref(self->stdout.buffer);