Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
b865d29f
Commit
b865d29f
authored
7 years ago
by
Richard Mudgett
Browse files
Options
Downloads
Patches
Plain Diff
frame.c: Make ast_frame_free()/ast_frfree() NULL tolerant
Change-Id: Ic49d821ef88ada38a31bdd835b9531443c55d793
parent
6f1910d6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/frame.c
+4
-6
4 additions, 6 deletions
main/frame.c
with
4 additions
and
6 deletions
main/frame.c
+
4
−
6
View file @
b865d29f
...
@@ -163,18 +163,16 @@ void ast_frame_free(struct ast_frame *frame, int cache)
...
@@ -163,18 +163,16 @@ void ast_frame_free(struct ast_frame *frame, int cache)
{
{
struct
ast_frame
*
next
;
struct
ast_frame
*
next
;
for
(
next
=
AST_LIST_NEXT
(
frame
,
frame_list
);
while
(
frame
)
{
frame
;
next
=
AST_LIST_NEXT
(
frame
,
frame_list
);
frame
=
next
,
next
=
frame
?
AST_LIST_NEXT
(
frame
,
frame_list
)
:
NULL
)
{
__frame_free
(
frame
,
cache
);
__frame_free
(
frame
,
cache
);
frame
=
next
;
}
}
}
}
void
ast_frame_dtor
(
struct
ast_frame
*
f
)
void
ast_frame_dtor
(
struct
ast_frame
*
f
)
{
{
if
(
f
)
{
ast_frfree
(
f
);
ast_frfree
(
f
);
}
}
}
/*!
/*!
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment