Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
1a09c6ee
Commit
1a09c6ee
authored
Aug 21, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leak in nr_rrc_gNB_decode_ccch()
parent
885a029a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+4
-4
No files found.
openair2/RRC/NR/rrc_gNB.c
View file @
1a09c6ee
...
...
@@ -1192,6 +1192,7 @@ static int nr_rrc_gNB_decode_ccch(module_id_t module_id, const f1ap_initial_ul_r
/* randomValue BIT STRING (SIZE (39)) */
if
(
rrcSetupRequest
->
ue_Identity
.
choice
.
randomValue
.
size
!=
5
)
{
// 39-bit random value
LOG_E
(
NR_RRC
,
"wrong InitialUE-Identity randomValue size, expected 5, provided %lu"
,
(
long
unsigned
int
)
rrcSetupRequest
->
ue_Identity
.
choice
.
randomValue
.
size
);
ASN_STRUCT_FREE
(
asn_DEF_NR_UL_CCCH_Message
,
ul_ccch_msg
);
return
-
1
;
}
uint64_t
random_value
=
0
;
...
...
@@ -1212,6 +1213,7 @@ static int nr_rrc_gNB_decode_ccch(module_id_t module_id, const f1ap_initial_ul_r
/* ng-5G-S-TMSI-Part1 BIT STRING (SIZE (39)) */
if
(
rrcSetupRequest
->
ue_Identity
.
choice
.
ng_5G_S_TMSI_Part1
.
size
!=
5
)
{
LOG_E
(
NR_RRC
,
"wrong ng_5G_S_TMSI_Part1 size, expected 5, provided %lu
\n
"
,
(
long
unsigned
int
)
rrcSetupRequest
->
ue_Identity
.
choice
.
ng_5G_S_TMSI_Part1
.
size
);
ASN_STRUCT_FREE
(
asn_DEF_NR_UL_CCCH_Message
,
ul_ccch_msg
);
return
-
1
;
}
...
...
@@ -1232,10 +1234,7 @@ static int nr_rrc_gNB_decode_ccch(module_id_t module_id, const f1ap_initial_ul_r
LOG_I
(
NR_RRC
,
"UE %04x 5G-S-TMSI-Part1 doesn't exist, setting ng_5G_S_TMSI_Part1 => %ld
\n
"
,
rnti
,
s_tmsi_part1
);
ue_context_p
=
rrc_gNB_create_ue_context
(
rnti
,
gnb_rrc_inst
,
s_tmsi_part1
,
msg
->
gNB_DU_ue_id
);
if
(
ue_context_p
==
NULL
)
{
LOG_E
(
NR_RRC
,
"rrc_gNB_get_next_free_ue_context returned NULL
\n
"
);
return
-
1
;
}
AssertFatal
(
ue_context_p
!=
NULL
,
"out of memory
\n
"
);
gNB_RRC_UE_t
*
UE
=
&
ue_context_p
->
ue_context
;
UE
->
Initialue_identity_5g_s_TMSI
.
presence
=
true
;
UE
->
ng_5G_S_TMSI_Part1
=
s_tmsi_part1
;
...
...
@@ -1357,6 +1356,7 @@ static int nr_rrc_gNB_decode_ccch(module_id_t module_id, const f1ap_initial_ul_r
break
;
}
}
ASN_STRUCT_FREE
(
asn_DEF_NR_UL_CCCH_Message
,
ul_ccch_msg
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment