Revert r240850 and remove redundant NULL check before free(3).
free(3) handles NULL parameter fine. Reviewed by: kib, Garrett Cooper
This commit is contained in:
parent
c148237d44
commit
b7b6a643aa
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user