Bug 203097 - [libgeom] multiple geom_stats_open/close() leaks memory
Summary: [libgeom] multiple geom_stats_open/close() leaks memory
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.2-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-14 11:58 UTC by erik
Modified: 2016-01-31 14:18 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description erik 2015-09-14 11:58:32 UTC
This program leaks non-RES memory, probably due to MAP_SHARED in the the mmap() reallocation.

<code>
#include <libgeom.h>

int main() {
	while (1) {
		geom_stats_open();
		geom_stats_close();
	}
	return 0;
}
</code>

# clang bug.c -lgeom && ./a.out