Fix: config: Correctly handle error of realloc()