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

next in thread | previous in thread | raw e-mail | index | archive | help
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.


-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxg=nEHTUr7dvjHo7ro5790sKDcO%2BMjPc_3r10EMNk_cUsQ>