fixed free_register()

Signed-off-by: nixnodes <code@eth.si>