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

Tony Houghton <[email protected]>
Newsgroups gmane.comp.desktop.rox.devel
Message-ID <[email protected]>
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. I'm not sure whether setting it to NULL is also
necessary without seeing the rest of the code, but this is the safe
option.

-- 
TH * http://www.realh.co.uk

-------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.