crypto/cryptodev: fix memory leak when failed to open /dev/crypto

Free the allocated fcrypt structure when opening /dev/crypto device fails, preventing memory leak.

Signed-off-by: makejian <makejian@xiaomi.com>
This commit is contained in:
makejian 2024-12-20 15:42:06 +08:00 committed by GUIDINGLI
parent ce982fac4c
commit a55119ccfe

View file

@ -982,6 +982,7 @@ bail:
kmm_free(cria.cri_key);
}
free(fcrd);
return ret;
}