svn commit: r240850 - head/lib/libstand
Konstantin Belousov
kostikbel at gmail.com
Sun Sep 23 10:52:25 UTC 2012
On Sun, Sep 23, 2012 at 08:38:06AM +0000, Kevin Lo wrote:
> Author: kevlo
> Date: Sun Sep 23 08:38:06 2012
> New Revision: 240850
> URL: http://svn.freebsd.org/changeset/base/240850
>
> Log:
> Avoid NULL dereference
>
> Modified:
> head/lib/libstand/nfs.c
>
> Modified: head/lib/libstand/nfs.c
> ==============================================================================
> --- head/lib/libstand/nfs.c Sun Sep 23 07:43:10 2012 (r240849)
> +++ head/lib/libstand/nfs.c Sun Sep 23 08:38:06 2012 (r240850)
> @@ -1256,8 +1256,10 @@ nfs_open(const char *upath, struct open_
> error = 0;
>
> out:
> - free(newfd);
> - free(path);
> + if (newfd)
> + free(newfd);
> + if (path)
> + free(path);
> #else
> currfd->iodesc = desc;
>
I do not see how this change is useful. libstand' Free() function handles
NULL parameter fine, as well as all other free(3) implementations I am
aware of.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20120923/86a480d0/attachment.pgp
More information about the svn-src-head
mailing list