roloc now exits on EOF and SIGINT.
Fix freeing memory of a potential NULL pointer.