From e78adba3fecde3b57e8953b3c6542c2e9c00e673 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Wed, 20 Apr 2016 01:00:13 +0000 Subject: [PATCH] linprocfs: Don't print uninitialized values Reported by: Coverity CID: 1354624 Sponsored by: EMC / Isilon Storage Division --- sys/compat/linprocfs/linprocfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); }