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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
lizhongxiao
OpenXG-RAN
Commits
7317efea
Commit
7317efea
authored
Oct 24, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clone pusch_Config to prevent double free
parent
10a0a526
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+18
-3
No files found.
openair2/RRC/NR/nr_rrc_config.c
View file @
7317efea
...
...
@@ -137,6 +137,20 @@ static NR_SetupRelease_PDSCH_ConfigCommon_t *clone_pdsch_configcommon(const NR_S
return
clone
;
}
static
NR_PUSCH_Config_t
*
clone_pusch_config
(
const
NR_PUSCH_Config_t
*
pc
)
{
if
(
pc
==
NULL
)
return
NULL
;
uint8_t
buf
[
1024
];
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_PUSCH_Config
,
NULL
,
pc
,
buf
,
sizeof
(
buf
));
AssertFatal
(
enc_rval
.
encoded
>
0
&&
enc_rval
.
encoded
<
sizeof
(
buf
),
"could not clone NR_PUSCH_Config: problem while encoding
\n
"
);
NR_PUSCH_Config_t
*
clone
=
NULL
;
asn_dec_rval_t
dec_rval
=
uper_decode
(
NULL
,
&
asn_DEF_NR_PUSCH_Config
,
(
void
**
)
&
clone
,
buf
,
enc_rval
.
encoded
,
0
,
0
);
AssertFatal
(
dec_rval
.
code
==
RC_OK
&&
dec_rval
.
consumed
==
enc_rval
.
encoded
,
"could not clone NR_PUSCH_Config: problem while decoding
\n
"
);
return
clone
;
}
NR_SearchSpace_t
*
rrc_searchspace_config
(
bool
is_common
,
int
searchspaceid
,
int
coresetid
)
{
...
...
@@ -1402,7 +1416,8 @@ static void config_uplinkBWP(NR_BWP_Uplink_t *ubwp,
NR_PUSCH_Config_t
*
pusch_Config
=
NULL
;
if
(
servingcellconfigdedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
&&
bwp_loop
<
servingcellconfigdedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
count
)
{
pusch_Config
=
servingcellconfigdedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_loop
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
;
pusch_Config
=
clone_pusch_config
(
servingcellconfigdedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_loop
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
);
}
ubwp
->
bwp_Dedicated
->
pusch_Config
=
config_pusch
(
pusch_Config
,
scc
,
configuration
->
force_256qam_off
?
NULL
:
uecap
);
...
...
@@ -2727,8 +2742,8 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC
NR_PUSCH_Config_t
*
pusch_Config
=
NULL
;
if
(
servingcellconfigdedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
)
{
pusch_Config
=
servingcellconfigdedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
0
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
;
pusch_Config
=
clone_pusch_config
(
servingcellconfigdedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
0
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
)
;
}
initialUplinkBWP
->
pusch_Config
=
config_pusch
(
pusch_Config
,
servingcellconfigcommon
,
uecap
);
...
...
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