Skip to content
Snippets Groups Projects
Commit 6352c6bb authored by Aurelien Jacobs's avatar Aurelien Jacobs
Browse files

fix a memleak in av_metadata_set()

Originally committed as revision 17617 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 144ae29d
No related branches found
No related tags found
No related merge requests found
...@@ -68,8 +68,10 @@ int av_metadata_set(AVMetadata **pm, const char *key, const char *value) ...@@ -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->elems[m->count].value= av_strdup(value);
m->count++; m->count++;
} }
if(!m->count) if(!m->count) {
av_free(m->elems);
av_freep(pm); av_freep(pm);
}
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment