diff options
| author | Mateusz Guzik <mjg@FreeBSD.org> | 2022-11-17 16:58:28 +0000 |
|---|---|---|
| committer | Mateusz Guzik <mjg@FreeBSD.org> | 2022-12-19 08:07:23 +0000 |
| commit | 85dac03e30e6aebdf0808cd750cc5ab96efcb67c (patch) | |
| tree | 10d3341535f9673bfca33fd2a581d5715b2a4a87 /sys/security/mac | |
| parent | 77e4249319c1a8331ca47ac8b65c3dc26ee598b4 (diff) | |
Diffstat (limited to 'sys/security/mac')
| -rw-r--r-- | sys/security/mac/mac_syscalls.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index 9bc334686aa4..ecb451ac2018 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -369,7 +369,8 @@ kern___mac_get_path(struct thread *td, const char *path_p, struct mac *mac_p, mac_vnode_copy_label(nd.ni_vp->v_label, intlabel); error = mac_vnode_externalize_label(intlabel, elements, buffer, mac.m_buflen); - NDFREE(&nd, 0); + vput(nd.ni_vp); + NDFREE_PNBUF(&nd); mac_vnode_label_free(intlabel); if (error == 0) @@ -542,9 +543,9 @@ kern___mac_set_path(struct thread *td, const char *path_p, struct mac *mac_p, td->td_ucred); vn_finished_write(mp); } + vput(nd.ni_vp); + NDFREE_PNBUF(&nd); } - - NDFREE(&nd, 0); out: mac_vnode_label_free(intlabel); return (error); |
