avutil/mem: fix memleak
authorZhao Zhili <wantlamy@gmail.com>
Mon, 18 Jul 2016 16:30:54 +0000 (00:30 +0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 28 Jul 2016 10:09:05 +0000 (12:09 +0200)
commit65b2feb890db3c1eeb8069c5313aa3e2345766ed
tree31e0371b8401918b9a9d8a0953e0035c7ca24542
parentd7ae4f79d364031be8a2209ee8de60c991aeb0b3
avutil/mem: fix memleak

The original code assumes av_realloc() will free ptr if size is zero.
The assumes is incorrect now.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavutil/mem.c