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

Re: [libvirt] [PATCH 1/2] parallels: fix parallelsDoCmdRun in case of command failure



On Mon, Sep 10, 2012 at 07:23:43PM +0400, Dmitry Guryanov wrote:
> Don't try to dereferece NULL pointer.
> ---
>  src/parallels/parallels_utils.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/parallels/parallels_utils.c b/src/parallels/parallels_utils.c
> index 35766b7..89a0d89 100644
> --- a/src/parallels/parallels_utils.c
> +++ b/src/parallels/parallels_utils.c
> @@ -55,7 +55,7 @@ parallelsDoCmdRun(char **outbuf, const char *binary, va_list list)
>    cleanup:
>      VIR_FREE(scmd);
>      virCommandFree(cmd);
> -    if (ret)
> +    if (ret && outbuf)
>          VIR_FREE(*outbuf);
>      return ret;
>  }
> -- 
> 1.7.1

  ACK, the two patches are no-brainer fixes, pushed, thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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