mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-27 21:40:34 +00:00
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>
This commit is contained in:
parent
d7ae4f79d3
commit
65b2feb890
@ -179,7 +179,7 @@ void *av_realloc_f(void *ptr, size_t nelem, size_t elsize)
|
||||
return NULL;
|
||||
}
|
||||
r = av_realloc(ptr, size);
|
||||
if (!r && size)
|
||||
if (!r)
|
||||
av_free(ptr);
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user