Re: [PATCH] command: plug memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/12/10 Eric Blake <eblake@xxxxxxxxxx>:
> * src/util/command.c (virCommandFree): Free data from
> virCommandSetInputBuffer.
> ---
> Âsrc/util/command.c | Â Â1 +
> Â1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/src/util/command.c b/src/util/command.c
> index 089e0bd..5e2b19a 100644
> --- a/src/util/command.c
> +++ b/src/util/command.c
> @@ -1198,6 +1198,7 @@ virCommandFree(virCommandPtr cmd)
> Â Â Â Â }
> Â Â }
>
> + Â ÂVIR_FREE(cmd->inbuf);
> Â Â VIR_FORCE_CLOSE(cmd->outfd);
> Â Â VIR_FORCE_CLOSE(cmd->errfd);
>

At first I wanted to complain that virCommandSetInputBuffer isn't
documented to take ownership of the inbuf, then I saw that it's
strdup'ed :)

ACK.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]