Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
cb8c5e53
Commit
cb8c5e53
authored
Nov 17, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmdutils: free the report file name.
Fix coverity issue 743443, which was a harmless leak.
parent
1ba2e589
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
cmdutils.c
cmdutils.c
+5
-2
No files found.
cmdutils.c
View file @
cb8c5e53
...
...
@@ -562,7 +562,7 @@ static void expand_filename_template(AVBPrint *bp, const char *template,
static
int
init_report
(
const
char
*
env
)
{
c
onst
char
*
filename_template
=
"%p-%t.log"
;
c
har
*
filename_template
=
NULL
;
char
*
key
,
*
val
;
int
ret
,
count
=
0
;
time_t
now
;
...
...
@@ -586,6 +586,7 @@ static int init_report(const char *env)
env
++
;
count
++
;
if
(
!
strcmp
(
key
,
"file"
))
{
av_free
(
filename_template
);
filename_template
=
val
;
val
=
NULL
;
}
else
{
...
...
@@ -596,7 +597,9 @@ static int init_report(const char *env)
}
av_bprint_init
(
&
filename
,
0
,
1
);
expand_filename_template
(
&
filename
,
filename_template
,
tm
);
expand_filename_template
(
&
filename
,
av_x_if_null
(
filename_template
,
"%p-%t.log"
),
tm
);
av_free
(
filename_template
);
if
(
!
av_bprint_is_complete
(
&
filename
))
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Out of memory building report file name
\n
"
);
return
AVERROR
(
ENOMEM
);
...
...
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