diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -537,9 +537,7 @@ error = kern_getfsstat(td, &buf, SIZE_T_MAX, &count, UIO_SYSSPACE, MNT_WAIT); if (error != 0) { - free(buf, M_TEMP); - free(flep, M_TEMP); - return (error); + goto out; } for (sp = buf; count > 0; sp++, count--) { @@ -559,6 +557,8 @@ sbuf_printf(sb, " 0 0\n"); } + error = 0; +out: free(buf, M_TEMP); free(flep, M_TEMP); return (error);