replaced malloc by xmalloc and NEW_ARR_A
drwxr-xr-x - ir