crypto: do not free algorithm before using