crypto/qat: fix allocation check and leak