If the requested NSDB is not in the server's NSDB database, the
buffer containing the NSDB's hostname is leaked.

Introduced by commit 0520ee72 "Initial commit" Tue Mar 29 15:37:40
2011.

Signed-off-by: Chuck Lever <[email protected]>
---

 src/fedfsd/svc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/fedfsd/svc.c b/src/fedfsd/svc.c
index 93b110b..9132177 100644
--- a/src/fedfsd/svc.c
+++ b/src/fedfsd/svc.c
@@ -1111,9 +1111,7 @@ fedfsd_svc_get_limited_nsdb_params_1(SVCXPRT *xprt)
                xlog(L_WARNING, "Unrecognized NSDB connection security "
                        "type for %s:%u", hostname, port);
        }
-
        nsdb_free_nsdb(host);
-       free(hostname);
 
 out:
        xlog(D_CALL, "%s: Replying with %s",
@@ -1126,6 +1124,8 @@ out:
 
        if (!svc_freeargs(xprt, (xdrproc_t)xdr_FedFsNsdbName, (caddr_t)&args))
                xlog(L_WARNING, "Failed to free GET_LIMITED_NSDB_PARAMS 
arguments");
+
+       free(hostname);
 }
 
 /**


_______________________________________________
fedfs-utils-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/fedfs-utils-devel

Reply via email to