diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 395c94fd6129..1a661b2b30f0 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -1422,7 +1422,7 @@ linprocfs_doproclimits(PFS_FILL_ARGS) "kern.sigqueue.max_pending_per_proc", &res, &size, 0, 0, 0, 0); if (error != 0) - break; + goto out; rl.rlim_cur = res; rl.rlim_max = res; break; @@ -1430,7 +1430,7 @@ linprocfs_doproclimits(PFS_FILL_ARGS) error = kernel_sysctlbyname(td, "kern.ipc.msgmnb", &res, &size, 0, 0, 0, 0); if (error != 0) - break; + goto out; rl.rlim_cur = res; rl.rlim_max = res; break; @@ -1452,6 +1452,7 @@ linprocfs_doproclimits(PFS_FILL_ARGS) li->desc, (unsigned long long)rl.rlim_cur, (unsigned long long)rl.rlim_max, li->unit); } +out: lim_free(limp); return (error); }