Moved userspace domain unmap to deactivate instead of release, fixing memory/ref leak.
--- a/lib/master.c Tue Apr 07 21:25:43 2015 -0400
+++ b/lib/master.c Sat May 31 14:49:02 2014 +1200
@@ -60,6 +60,11 @@
ec_domain_t *d, *next_d;
ec_slave_config_t *c, *next_c;
+ if (master->process_data) {
+ munmap(master->process_data, master->process_data_size);
+ master->process_data = NULL;
+ }
+
d = master->first_domain;
while (d) {
next_d = d->next;
@@ -81,10 +86,6 @@
void ec_master_clear(ec_master_t *master)
{
- if (master->process_data) {
- munmap(master->process_data, master->process_data_size);
- }
-
ec_master_clear_config(master);
if (master->fd != -1) {