Skip to content

Commit cb723a5

Browse files
d-a-vdevyte
authored andcommitted
realloc bug: fix #3953 (#3957)
fix #3699
1 parent bd261c0 commit cb723a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/umm_malloc/umm_malloc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1632,9 +1632,9 @@ static void *_umm_realloc( void *ptr, size_t size ) {
16321632

16331633
if( (ptr = _umm_malloc( size )) ) {
16341634
memcpy( ptr, oldptr, curSize );
1635+
_umm_free( oldptr );
16351636
}
16361637

1637-
_umm_free( oldptr );
16381638
}
16391639

16401640
/* Release the critical section... */

0 commit comments

Comments
 (0)