]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-varlink: _reset_fds() should reset fds for the reply being constructed
authorMike Yuan <me@yhndnzj.com>
Wed, 11 Feb 2026 17:02:04 +0000 (18:02 +0100)
committerMike Yuan <me@yhndnzj.com>
Mon, 16 Feb 2026 08:44:56 +0000 (09:44 +0100)
... (aka pushed_fds), not what's already enqueued to be sent out.

src/libsystemd/sd-varlink/sd-varlink.c

index d6d3b5bcb94233678a478e81073bd5ed9d6fc5b5..faa56d9d3a1634c98b720f0e00ed8afc03b3b276 100644 (file)
@@ -2662,8 +2662,8 @@ _public_ int sd_varlink_reset_fds(sd_varlink *v) {
          * rollback the fds. Note that this is implicitly called whenever an error reply is sent, see
          * below. */
 
-        close_many(v->output_fds, v->n_output_fds);
-        v->n_output_fds = 0;
+        close_many(v->pushed_fds, v->n_pushed_fds);
+        v->n_pushed_fds = 0;
         return 0;
 }