[Spice-devel] [spice-gtk] spice_parse_uri: Don't try to free unallocated string

Christophe Fergeau cfergeau at redhat.com
Tue Jan 27 02:22:42 PST 2015


On Tue, Jan 27, 2015 at 11:05:52AM +0100, Christophe Fergeau wrote:
> When it encounters an URI with a path, spice_parse_uri ignores it (with
> a runtime warning). However, it does not strdup the path component, so
> it's wrong to try to free it in the end/fail blocks.
> ---
>  gtk/spice-session.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/gtk/spice-session.c b/gtk/spice-session.c
> index 2dec8c7..3b86e80 100644
> --- a/gtk/spice-session.c
> +++ b/gtk/spice-session.c
> @@ -523,7 +523,6 @@ end:
>  fail:
>      g_free(uri);
>      g_free(unescaped_path);
> -    g_free(path);
>      g_free(host);
>      g_free(port);
>      g_free(tls_port);

Self NACK, this is added by one patch that I was reviewing. This is not
in git master.

Christophe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150127/8d730e82/attachment.sig>


More information about the Spice-devel mailing list