Commit 580e3d0e authored by aurel's avatar aurel

fix a memleak in av_metadata_set()

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17617 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent febfbb3c
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment