checking realloc status
rid of other warnings