Skip to content

Commit 0dcc990

Browse files
committed
realloc bug: fix esp8266#3953
fix esp8266#3699
1 parent bd261c0 commit 0dcc990

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)