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
09a6d825
Commit
09a6d825
authored
Jun 09, 2021
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid read null pointer file
parent
12f7f823
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
common/utils/system.c
common/utils/system.c
+7
-4
No files found.
common/utils/system.c
View file @
09a6d825
...
@@ -101,10 +101,13 @@ static int baseRunTimeCommand(char* cmd) {
...
@@ -101,10 +101,13 @@ static int baseRunTimeCommand(char* cmd) {
size_t
retSize
=
0
;
size_t
retSize
=
0
;
fp
=
popen
(
cmd
,
"r"
);
fp
=
popen
(
cmd
,
"r"
);
if
(
fp
)
{
memset
(
cmd
,
1
,
sizeof
(
*
cmd
));
memset
(
cmd
,
1
,
sizeof
(
*
cmd
));
retSize
=
fread
(
cmd
,
1
,
sizeof
(
*
cmd
),
fp
);
retSize
=
fread
(
cmd
,
1
,
sizeof
(
*
cmd
),
fp
);
fclose
(
fp
);
fclose
(
fp
);
}
else
{
LOG_D
(
HW
,
"%s:%d:%s: Cannot open %s
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
cmd
);
}
if
(
retSize
==
0
)
{
if
(
retSize
==
0
)
{
return
0
;
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