7307 Fixing 5780 introduced a regression
@@ -391,13 +391,14 @@ fdinfo.pr_size = -1; error = elfnote(vp, &offset, NT_FDINFO, sizeof (fdinfo), &fdinfo, rlimit, credp); VN_RELE(fvp); + if (error) { VN_RELE(vroot); - if (error) goto done; + } continue; } if (fvp->v_type == VSOCK) fdinfo.pr_fileflags |= sock_getfasync(fvp);