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

Re: [libvirt] [PATCH] virsh: console: Avoid using stream after being freed.



On 08/03/2012 01:28 PM, Peter Krempa wrote:
> The stream object wasn't freed causing a double free attempt.
> ---
>  tools/console.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/console.c b/tools/console.c
> index afece27..fee2ce3 100644
> --- a/tools/console.c
> +++ b/tools/console.c
> @@ -101,6 +101,7 @@ virConsoleShutdown(virConsolePtr con)
>          virStreamEventRemoveCallback(con->st);
>          virStreamAbort(con->st);
>          virStreamFree(con->st);
> +        con->st = NULL;
>      }
>      VIR_FREE(con->streamToTerminal.data);
>      VIR_FREE(con->terminalToStream.data);
> 

ACK,

Martin


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