mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: agent: fix potential leak in qemuAgentGetFSInfo()
On error paths, info_ret could potentially leak. Make sure it's freed. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
7c40211a5a
commit
1b380b89ff
@ -2208,6 +2208,7 @@ qemuAgentGetFSInfo(qemuAgentPtr mon,
|
|||||||
virDomainFSInfoFree(info_ret[i]);
|
virDomainFSInfoFree(info_ret[i]);
|
||||||
}
|
}
|
||||||
VIR_FREE(agentinfo);
|
VIR_FREE(agentinfo);
|
||||||
|
VIR_FREE(info_ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user