avutil/dict: av_realloc -> av_realloc_array()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
pull/357/head
Limin Wang 5 years ago
parent a1223ddc56
commit 4bc5eb27a7
  1. 4
      libavutil/dict.c

@ -103,8 +103,8 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value,
av_free(tag->key); av_free(tag->key);
*tag = m->elems[--m->count]; *tag = m->elems[--m->count];
} else if (copy_value) { } else if (copy_value) {
AVDictionaryEntry *tmp = av_realloc(m->elems, AVDictionaryEntry *tmp = av_realloc_array(m->elems,
(m->count + 1) * sizeof(*m->elems)); m->count + 1, sizeof(*m->elems));
if (!tmp) if (!tmp)
goto err_out; goto err_out;
m->elems = tmp; m->elems = tmp;

Loading…
Cancel
Save