git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
144ae29
)
fix a memleak in av_metadata_set()
author
Aurelien Jacobs
<aurel@gnuage.org>
Thu, 26 Feb 2009 14:40:04 +0000
(14:40 +0000)
committer
Aurelien Jacobs
<aurel@gnuage.org>
Thu, 26 Feb 2009 14:40:04 +0000
(14:40 +0000)
Originally committed as revision 17617 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/metadata.c
patch
|
blob
|
history
diff --git
a/libavformat/metadata.c
b/libavformat/metadata.c
index
6744f22
..
1a2a907
100644
(file)
--- a/
libavformat/metadata.c
+++ b/
libavformat/metadata.c
@@
-68,8
+68,10
@@
int av_metadata_set(AVMetadata **pm, const char *key, const char *value)
m->elems[m->count].value= av_strdup(value);
m->count++;
}
- if(!m->count)
+ if(!m->count) {
+ av_free(m->elems);
av_freep(pm);
+ }
return 0;
}