clean-up allocated resources after a failed open

If 'open /dev/crypto' fails, all allocated resources must be freed
before "open" returns; "close" can't be called to clean-up since
there is no file descriptor after a failed "open".

Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>