diff mbox

[1/9] nfsref: Fix double-free in nfsref_add_build_fsloc()

Message ID 20140627184220.52216.78040.stgit@seurat.1015granger.net
State Accepted
Headers show

Commit Message

Chuck Lever June 27, 2014, 6:42 p.m. UTC
nfs_free_location() already frees new->nfl_hostname.

Fixes: 538e6282 (nfsref: Introduce the "nfsref" command)
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 src/nfsref/add.c |    1 -
 1 file changed, 1 deletion(-)
diff mbox

Patch

diff --git a/src/nfsref/add.c b/src/nfsref/add.c
index f18f339cf0ab..865adc0301e2 100644
--- a/src/nfsref/add.c
+++ b/src/nfsref/add.c
@@ -149,7 +149,6 @@  nfsref_add_build_fsloc(const char *server, const char *rootpath,
 
 	retval = nsdb_posix_to_path_array(rootpath, &new->nfl_rootpath);
 	if (retval != FEDFS_OK) {
-		free(new->nfl_hostname);
 		nfs_free_location(new);
 		return retval;
 	}