mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Make codec_realloc retain the contents when resizing a memory segment
Change-Id: Ia2fc42eb0d36399e6856d3a957dd1634f019ca6a
This commit is contained in:
parent
4348b45857
commit
132fcca4b2
1 changed files with 2 additions and 1 deletions
|
|
@ -90,8 +90,9 @@ void codec_free(void* ptr) {
|
|||
void* codec_realloc(void* ptr, size_t size)
|
||||
{
|
||||
void* x;
|
||||
(void)ptr;
|
||||
x = codec_malloc(size);
|
||||
memcpy(x, ptr, size);
|
||||
codec_free(ptr);
|
||||
return(x);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue