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:
Jonathon Jongsma 2019-08-29 08:56:29 -05:00 committed by Erik Skultety
parent 7c40211a5a
commit 1b380b89ff

View File

@ -2208,6 +2208,7 @@ qemuAgentGetFSInfo(qemuAgentPtr mon,
virDomainFSInfoFree(info_ret[i]);
}
VIR_FREE(agentinfo);
VIR_FREE(info_ret);
return ret;
}