mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
remote: dispatch: free and close infiles too
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
2f282f300a
commit
20f1db2467
@ -4693,7 +4693,7 @@ qemuDispatchDomainMonitorCommandWithFiles(virNetServer *server G_GNUC_UNUSED,
|
|||||||
qemu_domain_monitor_command_with_files_ret *ret)
|
qemu_domain_monitor_command_with_files_ret *ret)
|
||||||
{
|
{
|
||||||
virDomainPtr dom = NULL;
|
virDomainPtr dom = NULL;
|
||||||
int *infiles = NULL;
|
g_autofree int *infiles = NULL;
|
||||||
unsigned int ninfiles = 0;
|
unsigned int ninfiles = 0;
|
||||||
int *outfiles = NULL;
|
int *outfiles = NULL;
|
||||||
unsigned int noutfiles = 0;
|
unsigned int noutfiles = 0;
|
||||||
@ -4736,6 +4736,9 @@ qemuDispatchDomainMonitorCommandWithFiles(virNetServer *server G_GNUC_UNUSED,
|
|||||||
rv = 0;
|
rv = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
for (i = 0; i < ninfiles; i++)
|
||||||
|
VIR_FORCE_CLOSE(infiles[i]);
|
||||||
|
|
||||||
for (i = 0; i < noutfiles; i++)
|
for (i = 0; i < noutfiles; i++)
|
||||||
VIR_FORCE_CLOSE(outfiles[i]);
|
VIR_FORCE_CLOSE(outfiles[i]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user