test: fix a termination problem in rma_register.c