realloc & free

use of realloc and free