qemu: Avoid memleak on failure to format blockjobs
virXMLFormatElement() frees attrBuf on success, but not necessarily on failure. Most other callers of this function take the time to reset attrBuf afterwords, but qemuDomainObjPrivateXMLFormatBlockjobs() was relying on it succeeding, and could thus result in a memory leak. Signed-off-by: NEric Blake <eblake@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
Showing
想要评论请 注册 或 登录