Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Feb 2013 20:04:46 -0800 (PST)
From:      Pedro Giffuni <pfg@freebsd.org>
To:        Eitan Adler <eadler@freebsd.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r246278 - head/usr.sbin/crunch/crunchide
Message-ID:  <1359864286.77306.YahooMailNeo@web162102.mail.bf1.yahoo.com>
In-Reply-To: <CAF6rxg=nEHTUr7dvjHo7ro5790sKDcO%2BMjPc_3r10EMNk_cUsQ@mail.gmail.com>
References:  <201302030154.r131sQZm084127@svn.freebsd.org> <CAF6rxg=nEHTUr7dvjHo7ro5790sKDcO%2BMjPc_3r10EMNk_cUsQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi Eitan;


----- Messaggio originale -----
> Da: Eitan Adler 

> 
> On 2 February 2013 20:54, Pedro F. Giffuni <pfg@freebsd.org> wrote:
>>  Author: pfg
>>  Date: Sun Feb  3 01:54:25 2013
>>  New Revision: 246278
>>  URL: http://svnweb.freebsd.org/changeset/base/246278
>> 
>>  Log:
>>    crunch: Sync some NetBSD changes
>> 
>>    Fix a couple of free's in previous commit.
>> 
>>    Obtained from:        NetBSD
>>    MFC after:    1 week
>> 
>>  Modified:
>>    head/usr.sbin/crunch/crunchide/exec_elf32.c
>> 
>>  Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c
>> 
> ==============================================================================
>>  --- head/usr.sbin/crunch/crunchide/exec_elf32.c Sun Feb  3 01:22:28 2013    
>     (r246277)
>>  +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Sun Feb  3 01:54:25 2013    
>     (r246278)
>>  @@ -384,6 +384,8 @@ out:
>>          if (symtabp != NULL)
>>                  free(symtabp);
>>          if (strtabp != NULL)
>>  +               free(strtabp);
>>  +       if (nstrtabp != NULL)
>>                  free(nstrtabp);
> 
> Why bother checking for NULL here?   7.22.2.3.2 says that free(NULL)
> results in no action.
>

You are right. I was just copying the NetBSD code blindly.

I will clean that tomorrow when I bring the mclinker fixes.

Pedro. 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1359864286.77306.YahooMailNeo>