dict: fix memleak

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/9/head
Michael Niedermayer 12 years ago
parent ffd02d0c19
commit 086566a557
  1. 1
      libavutil/dict.c

@ -98,6 +98,7 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags
if (!newval)
return AVERROR(ENOMEM);
av_strlcat(newval, oldval, len);
av_freep(&oldval);
av_strlcat(newval, value, len);
m->elems[m->count].value = newval;
} else

Loading…
Cancel
Save