rdt: check malloc calls

Signed-off-by: Anton Khirnov <anton@khirnov.net>