Re: Launch buttons in the options dialog now look for a locally installed app

Stephen Watson <[email protected]> Mon, 30 Jun 2008 18:44:48 +0100
Newsgroups gmane.comp.desktop.rox.devel
Message-ID <[email protected]>
Tony Houghton <[email protected]> wrote:

> In <[email protected]>
> Stephen Watson <[email protected]> wrote:
> 
> > "Thomas Leonard" <[email protected]> wrote:
> > 
> > > Looking at commit 11ce57102f89a7dad707d1a2f050749c4507414f
> > > (kerofin):
> > > 
> > > +  for(i=0; search[i]; i++)
> > > +  {
> > > +	  app=g_strconcat(search[i], "/", appname, NULL);
> > > +	  if(access(app, X_OK)==0)
> > > +		  goto out;
>           g_free(app);
>           app = NULL;
> > > +  }
> > > 
> > > Missing a g_free?
> > 
> > I don't think so.  app is returned and search is freed before exit.
> 
> It needs to be freed each time the loop fails to find a match though, as
> I've inserted above. 

Oh yes.

> I'm not sure whether setting it to NULL is also
> necessary 

It's set to NULL when the loop exits through expiry.

-- 
Stephen Watson     http://www.kerofin.demon.co.uk/
If you read this on a mailing list, send any reply back to the list and not
to me.  Not even CC.
Do you mind not farting while I'm saving the world?

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php