avformat/utils: free existing extradata before trying to allocate a new one
authorJames Almer <jamrial@gmail.com>
Tue, 6 Mar 2018 04:19:13 +0000 (01:19 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 6 Mar 2018 22:13:12 +0000 (19:13 -0300)
commit0ca33b1d4eb2a2a2e78ff3a37f1647917635b0d2
treec57d973553b0c4d81e6ed96f7ee6db0c61c29afe
parentb19e11a4dc836f4fe87d3e3c25eb5cc4f6f4b447
avformat/utils: free existing extradata before trying to allocate a new one

This prevents leaks in the rare cases the function is called when extradata
already exists.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/utils.c