rpc: Don't rewrite msg->fds on every read dispatch
When we are receiving data in smaller chunks it might happen that
virNetServerClientDispatchRead() will be called multiple times. And as
that happens, if it is a message that also transfer headers, we decode
the number of them every single time and, unfortunately, also allocate
the memory for them. That causes a leak, in the best scenario.
Best viewed with '-w'.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
Showing
想要评论请 注册 或 登录