Skip to content

Commit

Permalink
fix(mme): Fix NAS common procedure check segfaults (#8808) (#8811)
Browse files Browse the repository at this point in the history
* fix(agw): Fixing too many open files OS error by monitord async icmp

Signed-off-by: Alex Rodriguez <ardzoht@gmail.com>
  • Loading branch information
ardzoht committed Aug 27, 2021
1 parent f62cecc commit 935a89a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lte/gateway/c/oai/tasks/nas/nas_procedures.c
Expand Up @@ -45,6 +45,7 @@
#include "nas_procedures.h"
#include "common_defs.h"

// TODO: Add unit tests for common procedure functions
static nas_emm_common_proc_t* get_nas_common_procedure(
const struct emm_context_s* const ctxt, emm_common_proc_type_t proc_type);
static nas_cn_proc_t* get_nas_cn_procedure(
Expand Down Expand Up @@ -74,7 +75,7 @@ static nas_emm_common_proc_t* get_nas_common_procedure(
nas_emm_common_procedure_t* p2 = NULL;
while (p1) {
p2 = LIST_NEXT(p1, entries);
if (p1->proc->type == proc_type) {
if (p1->proc && (p1->proc->type == proc_type)) {
return p1->proc;
}
p1 = p2;
Expand All @@ -92,7 +93,7 @@ static nas_cn_proc_t* get_nas_cn_procedure(
nas_cn_procedure_t* p2 = NULL;
while (p1) {
p2 = LIST_NEXT(p1, entries);
if (p1->proc->type == proc_type) {
if (p1->proc && (p1->proc->type == proc_type)) {
return p1->proc;
}
p1 = p2;
Expand Down

0 comments on commit 935a89a

Please sign in to comment.