Zilin Guan
ccb679fdae
crypto: starfive - Fix memory leak in starfive_aes_aead_do_one_req()
...
The starfive_aes_aead_do_one_req() function allocates rctx->adata with
kzalloc() but fails to free it if sg_copy_to_buffer() or
starfive_aes_hw_init() fails, which lead to memory leaks.
Since rctx->adata is unconditionally freed after the write_adata
operations, ensure consistent cleanup by freeing the allocation in these
earlier error paths as well.
Compile tested only. Issue found using a prototype static analysis tool
and code review.
Fixes: 7467147ef9 ("crypto: starfive - Use dma for aes requests")
Signed-off-by: Zilin Guan <zilin@seu.edu.cn >
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au >
2026-02-06 18:52:22 +08:00
..
2025-12-10 06:38:17 +09:00
2025-12-05 17:29:04 -08:00
2025-12-06 18:34:24 -08:00
2025-12-05 20:41:20 -08:00
2025-12-10 06:29:40 +09:00
2025-12-14 15:24:10 +12:00
2025-12-01 16:21:16 -05:00
2025-12-06 18:34:24 -08:00
2026-02-06 18:52:22 +08:00
2025-12-08 09:38:52 +09:00
2025-12-05 17:29:04 -08:00
2025-12-06 18:34:24 -08:00
2025-12-05 21:29:02 -08:00
2025-12-05 17:29:04 -08:00
2026-02-06 18:52:22 +08:00
2025-12-05 17:47:59 -08:00
2025-12-05 13:52:43 -08:00
2025-11-27 18:11:43 -08:00
2025-12-09 06:35:53 +09:00
2025-12-04 18:42:48 -08:00
2025-12-06 09:01:27 -08:00
2025-12-04 12:26:36 -08:00
2026-01-23 13:48:43 +08:00
2025-12-13 16:36:57 +12:00
2025-12-13 17:39:28 +12:00
2025-12-10 06:38:17 +09:00
2025-12-09 06:10:17 +09:00
2025-12-09 08:46:10 +09:00
2025-12-06 18:34:24 -08:00
2025-12-10 07:48:05 +09:00
2025-12-12 23:59:39 +01:00
2025-12-06 18:34:24 -08:00
2025-12-04 18:54:37 -08:00
2025-12-10 16:44:18 +09:00
2025-12-06 10:15:41 -08:00
2025-12-14 06:07:09 +12:00
2025-12-05 17:29:04 -08:00
2025-12-05 17:29:04 -08:00
2025-11-28 09:47:44 -06:00
2025-12-14 15:35:35 +12:00
2025-12-06 08:27:07 -08:00
2025-12-05 17:29:04 -08:00
2025-12-04 15:18:33 -08:00
2025-12-14 15:35:35 +12:00
2025-12-04 14:10:16 -08:00
2025-12-09 08:50:27 +09:00
2025-12-08 11:25:14 +09:00
2025-12-06 09:32:25 -08:00
2025-12-09 08:53:24 +09:00
2025-12-06 18:34:24 -08:00
2025-12-13 16:26:55 +12:00
2025-12-06 16:24:52 -08:00
2025-12-13 16:29:22 +12:00
2025-12-06 18:34:24 -08:00
2025-12-02 17:03:55 -08:00
2025-12-09 06:45:00 +09:00
2025-12-10 06:38:17 +09:00
2025-12-04 13:50:39 -08:00
2025-12-05 17:29:04 -08:00
2025-12-04 15:50:37 -08:00
2025-12-03 12:42:36 -08:00
2025-12-03 17:24:33 -08:00
2025-12-13 16:41:50 +12:00
2025-12-04 17:10:08 -08:00
2025-12-11 09:54:59 +09:00
2025-11-29 15:20:23 -06:00
2025-12-08 09:38:52 +09:00
2025-11-26 10:16:10 -06:00
2025-12-13 17:09:06 +12:00
2026-01-31 10:52:30 +08:00
2025-12-14 15:35:35 +12:00
2025-12-03 17:24:33 -08:00
2025-12-06 09:01:27 -08:00
2025-12-08 12:37:27 +05:30
2025-12-11 09:57:08 +09:00
2025-12-06 18:52:00 -08:00
2025-12-14 15:35:35 +12:00
2025-12-05 17:29:04 -08:00
2025-12-06 18:42:12 -08:00
2025-12-06 18:38:19 -08:00
2025-12-08 22:11:00 -05:00
2025-11-26 15:10:39 +01:00
2025-12-06 18:42:12 -08:00
2025-12-05 13:52:43 -08:00
2025-12-04 19:42:53 -08:00
2025-12-04 18:59:21 -08:00
2025-12-06 15:41:26 -08:00
2025-12-04 17:34:16 -08:00
2025-11-27 02:03:07 -05:00
2025-12-06 10:00:49 -08:00
2025-12-06 10:49:19 -08:00
2025-12-06 18:52:00 -08:00
2025-12-06 18:52:00 -08:00