Re: [PATCH spice-gtk v3 4/7] spice-uri: Reset SpiceUri before parsing

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

 



On Fri, May 20, 2016 at 11:07:58AM +0200, Pavel Grunt wrote:
> > > diff --git a/src/spice-uri.c b/src/spice-uri.c
> > > index 3bdb502..04ea3cb 100644
> > > --- a/src/spice-uri.c
> > > +++ b/src/spice-uri.c
> > > @@ -105,6 +105,13 @@ gboolean spice_uri_parse(SpiceURI *self, const gchar
> > > *_uri, GError **error)
> > >      size_t len;
> > > 
> > >      g_return_val_if_fail(self != NULL, FALSE);
> > > +
> > > +    self->scheme = NULL;
> > > +    self->hostname = NULL;
> > > +    self->port = 0;
> > > +    self->user = NULL;
> > > +    self->password = NULL;
> > > +
> > 
> > g_clear_pointer to avoid leaks?
> 
> sure, thanks a lot, stupid me /o\

You could introduce a spice_uri_reset() which does that and is reused in
_finalize().

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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]