Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
openairinterface5G
Commits
e54f87a0
Commit
e54f87a0
authored
May 04, 2016
by
Cédric Roux
Browse files
bugfix: forgot malloc return check
parent
8cca28b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/utils/T/tracer/database.c
View file @
e54f87a0
...
...
@@ -459,7 +459,7 @@ int database_get_ids(void *_d, char ***ids)
{
database
*
d
=
_d
;
int
i
;
*
ids
=
malloc
(
d
->
isize
*
sizeof
(
char
**
));
*
ids
=
malloc
(
d
->
isize
*
sizeof
(
char
**
));
if
(
*
ids
==
NULL
)
abort
();
for
(
i
=
0
;
i
<
d
->
isize
;
i
++
)
(
*
ids
)[
i
]
=
d
->
i
[
i
].
name
;
return
d
->
isize
;
}
...
...
@@ -468,7 +468,7 @@ int database_get_groups(void *_d, char ***groups)
{
database
*
d
=
_d
;
int
i
;
*
groups
=
malloc
(
d
->
gsize
*
sizeof
(
char
**
));
*
groups
=
malloc
(
d
->
gsize
*
sizeof
(
char
**
));
if
(
*
groups
==
NULL
)
abort
();
for
(
i
=
0
;
i
<
d
->
gsize
;
i
++
)
(
*
groups
)[
i
]
=
d
->
g
[
i
].
name
;
return
d
->
gsize
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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