deallocate dedicatedInfoNAS in rrc

This commit is contained in:
Ismael Gomez 2018-07-10 19:52:46 +02:00 committed by Andre Puschmann
parent 2098aa0739
commit bd5c1fd83a
3 changed files with 7 additions and 2 deletions

View File

@ -183,7 +183,7 @@ public:
}
b->reset();
if (!pool->deallocate(b)) {
fprintf(stderr, "Error deallocating PDU: Addr=0x%lx not found in pool\n", (uint64_t) b);
printf("Error deallocating PDU: Addr=0x%lx not found in pool\n", (uint64_t) b);
}
b = NULL;
}

View File

@ -250,7 +250,6 @@ bool nas::rrc_connect() {
}
} else {
nas_log->error("Could not establish RRC connection\n");
pool->deallocate(dedicatedInfoNAS);
}
return false;
}

View File

@ -526,6 +526,12 @@ bool rrc::connection_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM cause,
}
}
if (!ret) {
rrc_log->warning("Could not estblish connection. Deallocating dedicatedInfoNAS PDU\n");
pool->deallocate(this->dedicatedInfoNAS);
this->dedicatedInfoNAS = NULL;
}
pthread_mutex_unlock(&mutex);
return ret;
}