From b7b6a643aab4709199140a50f3aa63ffb7144d97 Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Mon, 24 Sep 2012 05:24:10 +0000 Subject: [PATCH] Revert r240850 and remove redundant NULL check before free(3). free(3) handles NULL parameter fine. Reviewed by: kib, Garrett Cooper --- lib/libstand/nfs.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/libstand/nfs.c b/lib/libstand/nfs.c index cf90070aafc..a7a7ccb7e9f 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;