summaryrefslogtreecommitdiffstats
path: root/lib/libstand/nfs.c
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2012-09-24 05:24:10 +0000
committerkevlo <kevlo@FreeBSD.org>2012-09-24 05:24:10 +0000
commit8f32f603ab5b82f2c7a748f879c66a25d47383de (patch)
tree971025febdd60fceca060797ca51a121dca7dec9 /lib/libstand/nfs.c
parentc2b29c9319f156dccee19691cf564833580643ae (diff)
downloadFreeBSD-src-8f32f603ab5b82f2c7a748f879c66a25d47383de.zip
FreeBSD-src-8f32f603ab5b82f2c7a748f879c66a25d47383de.tar.gz
Revert r240850 and remove redundant NULL check before free(3).
free(3) handles NULL parameter fine. Reviewed by: kib, Garrett Cooper
Diffstat (limited to 'lib/libstand/nfs.c')
-rw-r--r--lib/libstand/nfs.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/libstand/nfs.c b/lib/libstand/nfs.c
index cf90070..a7a7ccb 100644
--- a/lib/libstand/nfs.c
+++ b/lib/libstand/nfs.c
@@ -606,10 +606,8 @@ nfs_open(const char *upath, struct open_file *f)
error = 0;
out:
- if (newfd)
- free(newfd);
- if (path)
- free(path);
+ free(newfd);
+ free(path);
#else
currfd->iodesc = desc;
@@ -1256,10 +1254,8 @@ nfs_open(const char *upath, struct open_file *f)
error = 0;
out:
- if (newfd)
- free(newfd);
- if (path)
- free(path);
+ free(newfd);
+ free(path);
#else
currfd->iodesc = desc;
OpenPOWER on IntegriCloud