Moved userspace domain unmap to deactivate instead of release, fixing memory/ref leak.

This commit is contained in:
Gavin Lambert 2014-05-31 14:49:02 +12:00
parent 2fef3fdfb1
commit 45f66e9565
1 changed files with 5 additions and 4 deletions

View File

@ -60,6 +60,11 @@ void ec_master_clear_config(ec_master_t *master)
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_config(ec_master_t *master)
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) {