On Tue, 18 Dec 2012 13:28:29 -0200
Eduardo Habkost <ehabk...@redhat.com> wrote:

> On Mon, Dec 17, 2012 at 05:01:19PM +0100, Igor Mammedov wrote:
> > freeing resources in one place would require setting 'error'
> > to not NULL, so add some more error reporting before jumping to
> > exit branch.
> > 
> > Signed-off-by: Igor Mammedov <imamm...@redhat.com>
> [...]
> > +out:
> > +    g_strfreev(model_pieces);
> >      if (error) {
> >          fprintf(stderr, "%s\n", error_get_pretty(error));
> >          error_free(error);
> > -        goto error;
> >      }
> > -
> > -    g_strfreev(model_pieces);
> 
> 
> You are making the function return 0 on errors. Is it on purpose?
Nope, I'm sorry it seems I've lost return -1; in error branch on the way.

> 
> 
> >      return 0;
> > -error:
> > -    g_strfreev(model_pieces);
> > -    return -1;
> >  }
> >  
> >  #if !defined(CONFIG_USER_ONLY)
> > -- 
> > 1.7.1
> > 
> > 
> 


Reply via email to