Skip to content

zb: keep ownership of received FDs, until disowned

Marc-André Lureau requested to merge elmarco/zbus:zb-fdleak into master

We may leak FDs if the message is dropped before the caller had the time to get it. So we should keep OwnerFD of those.

After this change, a Message will take the responsability of closing its owned FDs. Even after calling body() and the caller potentially manipulating the FDs (this keep the nice property of body being &self).

If the caller want to own the FDs, it can disown the Message, at which point it is its responsability.

Signed-off-by: Marc-André Lureau marcandre.lureau@redhat.com

Merge request reports