Date: Sun, 23 Sep 2012 08:38:06 +0000 (UTC) From: Kevin Lo <kevlo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240850 - head/lib/libstand Message-ID: <201209230838.q8N8c6Tu056083@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209230838.q8N8c6Tu056083>