svn commit: r334267 - head/lib/libprocstat
Eric van Gyzen
vangyzen at FreeBSD.org
Mon May 28 02:10:36 UTC 2018
Author: vangyzen
Date: Mon May 28 02:10:35 2018
New Revision: 334267
URL: https://svnweb.freebsd.org/changeset/base/334267
Log:
libprocstat: fix memory leak
Free the rlimits array on the happy path in procstat_getrlimit_core().
Reported by: Coverity
CID: 1373328
Sponsored by: Dell EMC
Modified:
head/lib/libprocstat/libprocstat.c
Modified: head/lib/libprocstat/libprocstat.c
==============================================================================
--- head/lib/libprocstat/libprocstat.c Mon May 28 01:59:48 2018 (r334266)
+++ head/lib/libprocstat/libprocstat.c Mon May 28 02:10:35 2018 (r334267)
@@ -2192,6 +2192,7 @@ procstat_getrlimit_core(struct procstat_core *core, in
return (-1);
}
*rlimit = rlimits[which];
+ free(rlimits);
return (0);
}
More information about the svn-src-head
mailing list