Re: [FFmpeg-devel] [PATCH 1/3] avutil/dict: Fix memleak when using AV_DICT_APPEND

2022-09-14 Thread Paul B Mahol
On 9/13/22, Andreas Rheinhardt wrote: > If a key already exists in an AVDictionary and the AV_DICT_APPEND flag > is set, the old entry is at first discarded from the dictionary, but > a pointer to the value is kept. Lateron enough memory to store the > appended string is allocated; should this all

[FFmpeg-devel] [PATCH 1/3] avutil/dict: Fix memleak when using AV_DICT_APPEND

2022-09-13 Thread Andreas Rheinhardt
If a key already exists in an AVDictionary and the AV_DICT_APPEND flag is set, the old entry is at first discarded from the dictionary, but a pointer to the value is kept. Lateron enough memory to store the appended string is allocated; should this allocation fail, the old string is not freed and h