aboutsummaryrefslogtreecommitdiff
path: root/sys/nlm
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-05-23 09:29:05 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-05-23 09:29:05 +0000
commit69921123490b99c2588b0c743bc4af32bbe6601c (patch)
tree4828066c23bd9bbd1672af14fbf0a9e31e47f4a0 /sys/nlm
parent5f7c516f216995249523ed43e57e3f91bd8f5ff0 (diff)
Notes
Diffstat (limited to 'sys/nlm')
-rw-r--r--sys/nlm/nlm_advlock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/nlm/nlm_advlock.c b/sys/nlm/nlm_advlock.c
index d6ccd2f8ef08..10b41ab0acff 100644
--- a/sys/nlm/nlm_advlock.c
+++ b/sys/nlm/nlm_advlock.c
@@ -202,7 +202,7 @@ nlm_advlock_internal(struct vnode *vp, void *id, int op, struct flock *fl,
union nfsfh fh;
struct sockaddr *sa;
struct sockaddr_storage ss;
- char servername[MNAMELEN];
+ char *servername;
struct timeval timo;
int retries;
rpcvers_t vers;
@@ -218,6 +218,7 @@ nlm_advlock_internal(struct vnode *vp, void *id, int op, struct flock *fl,
ASSERT_VOP_LOCKED(vp, "nlm_advlock_1");
+ servername = malloc(MNAMELEN, M_TEMP, M_WAITOK); /* XXXKIB vp locked */
nmp = VFSTONFS(vp->v_mount);
/*
* Push any pending writes to the server and flush our cache
@@ -381,7 +382,7 @@ nlm_advlock_internal(struct vnode *vp, void *id, int op, struct flock *fl,
AUTH_DESTROY(auth);
nlm_host_release(host);
-
+ free(servername, M_TEMP);
return (error);
}