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
336bb3f7
Commit
336bb3f7
authored
Dec 27, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/dict: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
9e893473
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
dict.c
libavutil/dict.c
+5
-5
No files found.
libavutil/dict.c
View file @
336bb3f7
...
...
@@ -120,7 +120,7 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value,
m
->
count
++
;
}
if
(
!
m
->
count
)
{
av_free
(
m
->
elems
);
av_free
p
(
&
m
->
elems
);
av_freep
(
pm
);
}
...
...
@@ -128,7 +128,7 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value,
err_out:
if
(
m
&&
!
m
->
count
)
{
av_free
(
m
->
elems
);
av_free
p
(
&
m
->
elems
);
av_freep
(
pm
);
}
if
(
flags
&
AV_DICT_DONT_STRDUP_KEY
)
av_free
((
void
*
)
key
);
...
...
@@ -197,10 +197,10 @@ void av_dict_free(AVDictionary **pm)
if
(
m
)
{
while
(
m
->
count
--
)
{
av_free
(
m
->
elems
[
m
->
count
].
key
);
av_free
(
m
->
elems
[
m
->
count
].
value
);
av_free
p
(
&
m
->
elems
[
m
->
count
].
key
);
av_free
p
(
&
m
->
elems
[
m
->
count
].
value
);
}
av_free
(
m
->
elems
);
av_free
p
(
&
m
->
elems
);
}
av_freep
(
pm
);
}
...
...
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