diff options
Diffstat (limited to 'libavformat/metadata.c')
-rw-r--r-- | libavformat/metadata.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/metadata.c b/libavformat/metadata.c index 6744f22db7..1a2a907d98 100644 --- 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; } |