Use xmalloc instead of malloc
Task for RDoc