]> git.ipfire.org Git - pakfire.git/commitdiff
jail: Reset all callbacks after execution
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 14 Jan 2024 16:01:43 +0000 (16:01 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 14 Jan 2024 16:01:43 +0000 (16:01 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/jail.c

index c03b03e459fd61f0d013c861b24ee297e4b7fd11..0f5b6874d36bef1226ed653d1894371efe89a5bc 100644 (file)
@@ -2485,6 +2485,10 @@ PAKFIRE_EXPORT int pakfire_jail_exec(struct pakfire_jail* jail, const char* argv
        }
 
 ERROR:
+       // Reset all callbacks
+       pakfire_jail_set_stdin_callback(jail, NULL, NULL);
+       pakfire_jail_set_stdout_callback(jail, NULL, NULL);
+
        // Destroy the temporary cgroup (if any)
        if (ctx.cgroup) {
                // Read cgroup stats