Re: [spice-gtk v1 2/2] file-xfer: fix file path leak

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

 



On Thu, May 12, 2016 at 10:42 PM, Victor Toso <victortoso@xxxxxxxxxx> wrote:
> ---
>  src/channel-main.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/channel-main.c b/src/channel-main.c
> index fb0630e..2e2fe86 100644
> --- a/src/channel-main.c
> +++ b/src/channel-main.c
> @@ -2956,8 +2956,10 @@ static void spice_file_transfer_task_completed(SpiceFileTransferTask *self,
>      if (self->priv->error)
>          g_clear_error(&error);
>      if (error) {
> +        gchar *path = g_file_get_path(self->priv->file);
>          SPICE_DEBUG("File %s xfer failed: %s",
> -                    g_file_get_path(self->priv->file), error->message);
> +                    path, error->message);
> +        g_free(path);
>          self->priv->error = error;
>      }
>
> --
> 2.5.5
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Acked-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>

Just out of curiosity, did you get it just by reading the code or on
valgrind usage?
-- 
Fabiano Fidêncio
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]